Cache::Backend -- and interface for cache peristance mechanisms



NAME

Cache::Backend -- and interface for cache peristance mechanisms


DESCRIPTION

Classes that implement the Backend interface can be used in conjuction with the BaseCache class to create cache classes. It is important that classes that implement Backend do not presume that they are storing any particular type of data, or even that they are being used by a class that implements the Cache interface.


METHODS

new( )
Construct a new instance of the backend

delete_key( $namespace, $key )
Remove the data associated with $key from the $namespace.

delete_namespace( $namespace )
Remove data associated with all keys in the $namespace.

get_keys( $namespace )
Return a list of all keys pointing to data in the $namespace.

get_namespaces( )
Return a list of all namespaces this backend knows about.

get_size( $namespace, $key )
Return the size (in bytes) of the data associated with $key in the $namespace.

restore( $namespace, $key )
Return the data associated with $key in the $namespace.

store( $namespace, $key, $data )
Associate the $data with the $key in the $namespace.


SEE ALSO

Cache::FileBackend, Cache::MemoryBackend, Cache::SharedMemoryBackend


AUTHOR

Original author: DeWitt Clinton <dewitt@unto.net>

Last author: $Author: dclinton $

Copyright (C) 2001 DeWitt Clinton

 Cache::Backend -- and interface for cache peristance mechanisms