ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Abstract class representing Definition cache managers that implements useful common methods and is a factory. More...
Public Member Functions | |
__construct ($type) | |
generateKey ($config) | |
Generates a unique identifier for a particular configuration. More... | |
isOld ($key, $config) | |
Tests whether or not a key is old with respect to the configuration's version and revision number. More... | |
checkDefType ($def) | |
Checks if a definition's type jives with the cache's type. More... | |
add ($def, $config) | |
Adds a definition object to the cache. More... | |
set ($def, $config) | |
Unconditionally saves a definition object to the cache. More... | |
replace ($def, $config) | |
Replace an object in the cache. More... | |
get ($config) | |
Retrieves a definition object from the cache. More... | |
remove ($config) | |
Removes a definition object to the cache. More... | |
flush ($config) | |
Clears all objects from cache. More... | |
cleanup ($config) | |
Clears all expired (older version or revision) objects from cache. More... | |
Data Fields | |
$type | |
string More... | |
Abstract class representing Definition cache managers that implements useful common methods and is a factory.
Create a separate maintenance file advanced users can use to cache their custom HTMLDefinition, which can be loaded via a configuration directive
Implement memcached
Definition at line 11 of file DefinitionCache.php.
HTMLPurifier_DefinitionCache::__construct | ( | $type | ) |
string | $type | Type of definition objects this instance of the cache will handle. |
Definition at line 22 of file DefinitionCache.php.
References $type.
|
abstract |
Adds a definition object to the cache.
HTMLPurifier_Definition | $def | |
HTMLPurifier_Config | $config |
Referenced by checkDefType().
HTMLPurifier_DefinitionCache::checkDefType | ( | $def | ) |
Checks if a definition's type jives with the cache's type.
HTMLPurifier_Definition | $def | Definition object to check |
Definition at line 71 of file DefinitionCache.php.
References $config, $def, add(), cleanup(), flush(), and replace().
Referenced by HTMLPurifier_DefinitionCache_Serializer\add(), HTMLPurifier_DefinitionCache_Serializer\replace(), and HTMLPurifier_DefinitionCache_Serializer\set().
|
abstract |
Clears all expired (older version or revision) objects from cache.
HTMLPurifier_Config | $config |
Referenced by checkDefType().
|
abstract |
Clears all objects from cache.
HTMLPurifier_Config | $config |
Referenced by checkDefType().
HTMLPurifier_DefinitionCache::generateKey | ( | $config | ) |
Generates a unique identifier for a particular configuration.
HTMLPurifier_Config | $config | Instance of HTMLPurifier_Config |
Definition at line 32 of file DefinitionCache.php.
References $config.
Referenced by HTMLPurifier_DefinitionCache_Decorator_Memory\add(), HTMLPurifier_DefinitionCache_Serializer\generateFilePath(), HTMLPurifier_DefinitionCache_Decorator_Memory\get(), HTMLPurifier_DefinitionCache_Decorator_Memory\replace(), and HTMLPurifier_DefinitionCache_Decorator_Memory\set().
|
abstract |
Retrieves a definition object from the cache.
HTMLPurifier_Config | $config |
HTMLPurifier_DefinitionCache::isOld | ( | $key, | |
$config | |||
) |
Tests whether or not a key is old with respect to the configuration's version and revision number.
string | $key | Key to test |
HTMLPurifier_Config | $config | Instance of HTMLPurifier_Config to test against |
Definition at line 46 of file DefinitionCache.php.
References $config, $key, and $version.
Referenced by HTMLPurifier_DefinitionCache_Serializer\cleanup().
|
abstract |
Removes a definition object to the cache.
HTMLPurifier_Config | $config |
|
abstract |
Replace an object in the cache.
HTMLPurifier_Definition | $def | |
HTMLPurifier_Config | $config |
Referenced by checkDefType().
|
abstract |
Unconditionally saves a definition object to the cache.
HTMLPurifier_Definition | $def | |
HTMLPurifier_Config | $config |
HTMLPurifier_DefinitionCache::$type |
string
Definition at line 16 of file DefinitionCache.php.
Referenced by __construct(), and HTMLPurifier_DefinitionCache_Serializer\generateDirectoryPath().