Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://wiki.cmc.msu.ru/System/PerlDoc?cover=print;module=Foswiki::Cache
Дата изменения: Unknown Дата индексирования: Tue Apr 12 12:10:40 2016 Кодировка: |
internal package
Foswiki::Cache internal package
Foswiki::Cache ClassMethod
new( $session ) → $object Construct a new cache delegator.
ObjectMethod
init($session) Subclasses should call up to this method at the start of overriding implementations.
ObjectMethod
DESTROY() Explicit destructor to break cyclic links.
ObjectMethod
finish() Clean up internal structures
ObjectMethod
genkey($string, $key) → $key Generate a key for the current cache.
Some cache implementations don't have a namespace feature. Those which do are only able to serve objects from within one namespace per cache object.
So by default we encode the namespace into the key here, even when this is redundant, given that you specify the namespace for Cache::Cache implementations during the constructor already.
ObjectMethod
set($key, $object ... ) → $boolean Cache an $object under the given $key. Note that the object won't be flushed to disk until we called finish().
Returns true if it was stored sucessfully
ObjectMethod
get($key) → $object Retrieve a cached object, returns undef if it does not exist
ObjectMethod
delete($key) → $boolean Delete an entry for a given $key
Returns true if the key was found and deleted, and false otherwise
ObjectMethod
clear() Removes all objects from the cache.