Class HTMLPurifier_DefinitionCache

Description

Abstract class representing Definition cache managers that implements useful common methods and is a factory.

  • todo: Implement memcached
  • todo: Create a separate maintenance file advanced users can use to cache their custom HTMLDefinition, which can be loaded via a configuration directive
  • abstract:

Located in /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 2290)


	
			
Direct descendents
Class Description
HTMLPurifier_DefinitionCache_Decorator Abstract class representing Definition cache managers that implements useful common methods and is a factory.
HTMLPurifier_DefinitionCache_Null Null cache object to use when no caching is on.
HTMLPurifier_DefinitionCache_Serializer Abstract class representing Definition cache managers that implements useful common methods and is a factory.
Variable Summary
mixed $type
Method Summary
HTMLPurifier_DefinitionCache __construct ($name $type)
void add ( $def,  $config)
Boolean checkDefType ($def $def)
void cleanup ( $config)
void flush ( $config)
void generateKey (Instance $config)
void get ( $config)
void isOld ($key $key, $config $config)
void remove ( $config)
void replace ( $def,  $config)
void set ( $def,  $config)
Variables
mixed $type (line 2293)
  • access: public
Methods
Constructor __construct (line 2299)
  • access: public
HTMLPurifier_DefinitionCache __construct ($name $type)
  • $name $type: Type of definition objects this instance of the cache will handle.

Redefined in descendants as:
checkDefType (line 2339)

Checks if a definition's type jives with the cache's type

  • return: true if good, false if not
  • access: public
Boolean checkDefType ($def $def)
  • $def $def: Definition object to check
cleanup (line 2383)

Clears all expired (older version or revision) objects from cache

  • abstract:
  • access: public
void cleanup ( $config)
  • $config

Redefined in descendants as:
flush (line 2375)

Clears all objects from cache

  • abstract:
  • access: public
void flush ( $config)
  • $config

Redefined in descendants as:
generateKey (line 2307)

Generates a unique identifier for a particular configuration

  • access: public
void generateKey (Instance $config)
  • Instance $config: of HTMLPurifier_Config
isOld (line 2319)

Tests whether or not a key is old with respect to the configuration's version and revision number.

  • access: public
void isOld ($key $key, $config $config)
  • $key $key: Key to test
  • $config $config: Instance of HTMLPurifier_Config to test against
remove (line 2370)

Removes a definition object to the cache

  • abstract:
  • access: public
void remove ( $config)
  • $config

Redefined in descendants as:
set (line 2355)

Unconditionally saves a definition object to the cache

  • abstract:
  • access: public
void set ( $def,  $config)
  • $def
  • $config

Redefined in descendants as:

Documentation generated on Sun, 06 Mar 2011 00:24:05 -0500 by phpDocumentor 1.4.3