DrupalCacheInterface
interface DrupalCacheInterface
Defines an interface for cache implementations.
All cache implementations have to implement this interface. DrupalDatabaseCache provides the default implementation, which can be consulted as an example.
To make Drupal use your implementation for a certain cache bin, you have to set a variable with the name of the cache bin as its key and the name of your class as its value. For example, if your implementation of DrupalCacheInterface was called MyCustomCache, the following line would make Drupal use it for the 'cache_page' bin:
variable_set('cache_class_cache_page', 'MyCustomCache');
Additionally, you can register your cache implementation to be used by default for all cache bins by setting the variable 'cache_default_class' to the name of your implementation of the DrupalCacheInterface, e.g.
variable_set('cache_de