Class Varien_Cache_Backend_Eaccelerator

Description

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@magentocommerce.com so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Located in /Cache/Backend/Eaccelerator.php (line 27)

Zend_Cache_Backend
   |
   --Varien_Cache_Backend_Eaccelerator
Class Constant Summary
TAGS_UNSUPPORTED_BY_CLEAN_OF_EACCELERATOR_BACKEND = 'Varien_Cache_Backend_Eaccelerator::clean() : tags are unsupported by the Eaccelerator backend'
TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND = 'Varien_Cache_Backend_Eaccelerator::save() : tags are unsupported by the Eaccelerator backend'
Method Summary
void __construct ([ $options = array()])
boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [array $tags = array()])
array getCapabilities ()
array getIds ()
array getIdsMatchingAnyTags ([array $tags = array()])
array getIdsMatchingTags ([array $tags = array()])
array getIdsNotMatchingTags ([array $tags = array()])
array getMetadatas (string $id)
array getTags ()
string load (string $id, [boolean $doNotTestCacheValidity = false])
boolean remove (string $id)
boolean save (string $data, string $id, [array $tags = array()], [int $specificLifetime = false])
mixed test (string $id)
boolean touch (string $id, int $extraLifetime)
Methods
Constructor __construct (line 42)

Constructor

  • throws: Zend_Cache_Exception
  • access: public
void __construct ([ $options = array()])
  • array $options: associative array of options
clean (line 131)

Clean some cache records

Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => unsupported 'matchingTag' => unsupported 'notMatchingTag' => unsupported 'matchingAnyTag' => unsupported

  • return: true if no problem
  • throws: Zend_Cache_Exception
  • access: public
boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [array $tags = array()])
  • string $mode: clean mode
  • array $tags: array of tags
getCapabilities (line 328)

Return an associative array of capabilities (booleans) of the backend

The array must include these keys :

  • automatic_cleaning (is automating cleaning necessary)
  • tags (are tags supported)
  • expired_read (is it possible to read expired cache records (for doNotTestCacheValidity option for example))
  • priority does the backend deal with priority when saving
  • infinite_lifetime (is infinite lifetime can work with this backend)
  • get_list (is it possible to get the list of cache ids and the complete list of tags)

  • return: associative of with capabilities
  • access: public
array getCapabilities ()
getFillingPercentage (line 170)

Return the filling percentage of the backend storage

  • return: integer between 0 and 100
  • throws: Zend_Cache_Exception
  • access: public
int getFillingPercentage ()
getIds (line 243)

Return an array of stored cache ids

  • return: array of stored cache ids (string)
  • access: public
array getIds ()
getIdsMatchingAnyTags (line 232)

Return an array of stored cache ids which match any given tags

In case of multiple tags, a logical AND is made between tags

  • return: array of any matching cache ids (string)
  • access: public
array getIdsMatchingAnyTags ([array $tags = array()])
  • array $tags: array of tags
getIdsMatchingTags (line 204)

Return an array of stored cache ids which match given tags

In case of multiple tags, a logical AND is made between tags

  • return: array of matching cache ids (string)
  • access: public
array getIdsMatchingTags ([array $tags = array()])
  • array $tags: array of tags
getIdsNotMatchingTags (line 218)

Return an array of stored cache ids which don't match given tags

In case of multiple tags, a logical OR is made between tags

  • return: array of not matching cache ids (string)
  • access: public
array getIdsNotMatchingTags ([array $tags = array()])
  • array $tags: array of tags
getMetadatas (line 264)

Return an array of metadatas for the given cache id

The array must include these keys :

  • expire : the expire timestamp
  • tags : a string array of tags
  • mtime : timestamp of last modification time

  • return: array of metadatas (false if the cache id is not found)
  • access: public
array getMetadatas (string $id)
  • string $id: cache id
getTags (line 190)

Return an array of stored tags

  • return: array of stored tags (string)
  • access: public
array getTags ()
isAutomaticCleaningAvailable (line 159)

Return true if the automatic cleaning is available for the backend

DEPRECATED : use getCapabilities() instead

  • deprecated:
  • access: public
boolean isAutomaticCleaningAvailable ()
load (line 59)

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

WARNING $doNotTestCacheValidity=true is unsupported by the Eaccelerator backend

  • return: cached datas (or false)
  • access: public
string load (string $id, [boolean $doNotTestCacheValidity = false])
  • string $id: cache id
  • boolean $doNotTestCacheValidity: if set to true, the cache validity won't be tested
remove (line 111)

Remove a cache record

  • return: true if no problem
  • access: public
boolean remove (string $id)
  • string $id: cache id
save (line 95)

Save some string datas into a cache record

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

  • return: true if no problem
  • access: public
boolean save (string $data, string $id, [array $tags = array()], [int $specificLifetime = false])
  • string $data: datas to cache
  • string $id: cache id
  • array $tags: array of strings, the cache record will be tagged by each string entry
  • int $specificLifetime: if != false, set a specific lifetime for this cache record (null => infinite lifetime)
test (line 74)

Test if a cache is available or not (for the given id)

  • return: false (a cache is not available) or "last modified" timestamp (int) of the available cache record
  • access: public
mixed test (string $id)
  • string $id: cache id
touch (line 292)

Give (if possible) an extra lifetime to the given cache id

  • return: true if ok
  • access: public
boolean touch (string $id, int $extraLifetime)
  • string $id: cache id
  • int $extraLifetime
Class Constants
TAGS_UNSUPPORTED_BY_CLEAN_OF_EACCELERATOR_BACKEND = 'Varien_Cache_Backend_Eaccelerator::clean() : tags are unsupported by the Eaccelerator backend' (line 32)

Log message

TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND = 'Varien_Cache_Backend_Eaccelerator::save() : tags are unsupported by the Eaccelerator backend' (line 33)

Documentation generated on Fri, 11 Feb 2011 16:53:17 +0200 by phpDocumentor 1.4.3