Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Cache_Backend_Interface Interface Reference
Inheritance diagram for Zend_Cache_Backend_Interface:
Zend_Cache_Backend_ExtendedInterface Zend_Cache_Backend_Static Zend_Cache_Backend_Xcache Zend_Cache_Backend_ZendPlatform Zend_Cache_Backend_ZendServer Zend_Cache_Backend_ZendServer_Disk Zend_Cache_Backend_ZendServer_ShMem Database AbstractDecorator Eaccelerator Memcached MongoDb RemoteSynchronizedCache CoreTestMock Zend_Cache_Backend_Apc Zend_Cache_Backend_BlackHole Zend_Cache_Backend_File Zend_Cache_Backend_Libmemcached Zend_Cache_Backend_Memcached Zend_Cache_Backend_Test Zend_Cache_Backend_TwoLevels Zend_Cache_Backend_WinCache Zend_Cache_Backend_ZendServer_Disk Zend_Cache_Backend_ZendServer_ShMem

Public Member Functions

 setDirectives ($directives)
 
 load ($id, $doNotTestCacheValidity=false)
 
 test ($id)
 
 save ($data, $id, $tags=array(), $specificLifetime=false)
 
 remove ($id)
 
 clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array())
 

Detailed Description

Definition at line 30 of file Interface.php.

Member Function Documentation

◆ clean()

clean (   $mode = Zend_Cache::CLEANING_MODE_ALL,
  $tags = array() 
)

Clean some cache records

Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags ($tags can be an array of strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags} ($tags can be an array of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags ($tags can be an array of strings or a single string)

Parameters
string$modeClean mode
array$tagsArray of tags
Returns
boolean true if no problem

Implemented in Zend_Cache_Backend_Static, MongoDb, Zend_Cache_Backend_File, Zend_Cache_Backend_TwoLevels, Database, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Test, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Xcache, RemoteSynchronizedCache, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, AbstractDecorator, Eaccelerator, and Zend_Cache_Backend_BlackHole.

◆ load()

load (   $id,
  $doNotTestCacheValidity = false 
)

Test if a cache is available for the given id and (if yes) return it (false else)

Note : return value is always "string" (unserialization is done by the core not by the backend)

Parameters
string$idCache id
boolean$doNotTestCacheValidityIf set to true, the cache validity won't be tested
Returns
string|false cached datas

Implemented in MongoDb, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Database, Zend_Cache_Backend_Static, RemoteSynchronizedCache, Memcached, Zend_Cache_Backend_Test, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, AbstractDecorator, Zend_Cache_Backend_BlackHole, Eaccelerator, and Compression.

◆ remove()

remove (   $id)

◆ save()

save (   $data,
  $id,
  $tags = array(),
  $specificLifetime = false 
)

Save some string datas into a cache record

Note : $data is always "string" (serialization is done by the core not by the backend)

Parameters
string$dataDatas to cache
string$idCache id
array$tagsArray of strings, the cache record will be tagged by each string entry
int$specificLifetimeIf != false, set a specific lifetime for this cache record (null => infinite lifetime)
Returns
boolean true if no problem

Implemented in MongoDb, Zend_Cache_Backend_File, Zend_Cache_Backend_Static, Zend_Cache_Backend_Memcached, Database, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Test, RemoteSynchronizedCache, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, Memcached, Eaccelerator, and Zend_Cache_Backend_BlackHole.

◆ setDirectives()

setDirectives (   $directives)

Set the frontend directives

Parameters
array$directivesassoc of directives

Implemented in Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, RemoteSynchronizedCache, Zend_Cache_Backend_Test, and AbstractDecorator.

◆ test()

test (   $id)

The documentation for this interface was generated from the following file: