Свойство | Тип | Описание | |
---|---|---|---|
$data | array | The actual cached data | |
$dependencies | array:CacheKey | This is a storage of dependencies for this cache. This is stored here as the russian doll model will automatically push up dependencies. In the end this will probably be used by the storage for easy invalidation. | |
$key | |||
$lifetime | integer | Lifetime: how long this cache should live. It's up to the storage implementation the details of how this will be obeyed, if at all. |
Метод | Описание | |
---|---|---|
__construct ( |
||
addDependencies ( array $deps ) : |
Adds a dependency | |
addDependency ( |
Adds a dependency | |
appendCallback ( callable $callback ) : |
||
appendData ( mixed $data ) : |
||
appendRecursion ( |
||
appendRecursionData ( |
||
checkClash ( |
Checks if a set of keys clashes with the ones used here. | |
checkUpdateToDate ( |
Checks if dependencies are still fresh. | |
clearDependenciesHash ( ) | ||
dependencyInit ( |
Init dependencies. If increment is not supported by backend return 0. | |
generateDependenciesHash ( |
Get a fresh hash based on dependencies. Does not update the current hash. | |
getDependencies ( ) | ||
getDependenciesHash ( ) | ||
getFirstData ( ) : any | null | Convenience function. Returns the first data self::CACHEDATA_TYPE_DATA that you stored. Returns null if there is none. | |
getKey ( ) | ||
mergeDependencies ( |
||
serialize ( ) : string | Serialize this object to a string so we can easily store. | |
setDependencies ( array $deps, |
Sets the list of dependencies and updates the dependency hash | |
setKey ( |
||
setLifetime ( integer $lifetime ) : |
||
stringify ( |
Converts this data to a string that can output. This is not a hash key or a serialization, but an actual render for humans. | |
unserialize ( string $data ) : |
Unserializes data and returns a new CacheData. This is what you should use to get the object data from the storage. | |
updateDependenciesHash ( |
||
updateDependenciesHashIfNull ( |
public addDependencies ( array $deps ) : |
||
$deps | array | |
Результат | This |
public addDependency ( |
||
$k | ||
Результат | This |
public appendCallback ( callable $callback ) : |
||
$callback | callable | |
Результат |
public appendData ( mixed $data ) : |
||
$data | mixed | Any kind of data you want to store. usually strings. |
Результат |
public checkClash ( |
||
$k | ||
Результат | boolean | True if they match and there is a clash |
public checkUpdateToDate ( |
||
$cache | ||
Результат | boolean |
public dependencyInit ( |
||
$cache | ||
$k | ||
Результат | integer |
public generateDependenciesHash ( |
||
$cache | ||
Результат | string |
public getFirstData ( ) : any | null | ||
Результат | any | null |
public mergeDependencies ( |
||
$cd | ||
Результат |
public setDependencies ( array $deps, |
||
$deps | array | |
$cache | ||
Результат |
public setKey ( |
||
$ck | ||
Результат |
public setLifetime ( integer $lifetime ) : |
||
$lifetime | integer | |
Результат |
public stringify ( |
||
$c |
public static unserialize ( string $data ) : |
||
$data | string | |
Результат |
public updateDependenciesHash ( |
||
$cache |
public updateDependenciesHashIfNull ( |
||
$cache |
public array:CacheKey $dependencies | ||
Результат | array:CacheKey |
public int $lifetime | ||
Результат | integer |