Class Mage_Core_Model_Cache

Description

System cache model

support id and tags preffix support,

Located in /Core/Model/Cache.php (line 32)


	
			
Class Constant Summary
INVALIDATED_TYPES = 'core_cache_invalidate'
OPTIONS_CACHE_ID = 'core_cache_options'
XML_PATH_TYPES = 'global/cache/types'
Variable Summary
Method Summary
Mage_Core_Model_Cache __construct ([ $options = array()])
Mage_Core_Model_Cache banUse (string $typeCode)
bool canUse (string $typeCode)
bool clean ([array $tags = array()])
void cleanType ($typeCode $typeCode)
bool flush ()
Zend_Db_Adapter_Abstract getDbAdapter ()
Zend_Cache_Core getFrontend ()
array getTagsByType (string $type)
array getTypes ()
void invalidateType (string|array $typeCode)
string load (string $id)
bool processRequest ()
bool remove (string $id)
bool save (string $data, string $id, [array $tags = array()], [int $lifeTime = null])
array _getBackendOptions ( $cacheOptions)
array _getFrontendOptions ( $cacheOptions)
void _getProcessor ( $processor)
array _getTwoLevelsBackendOptions (array $fastOptions, array $cacheOptions)
string _id (string $id)
array _tags ([array $tags = array()])
Variables
array $_allowedCacheOptions = null (line 91)

List of allowed cache options

  • access: protected
string $_defaultBackend = 'File' (line 66)

Fefault cache backend type

  • access: protected
array $_defaultBackendOptions = array(
'hashed_directory_level' => 1,
'hashed_directory_umask' => 0777,
'file_name_prefix' => 'mage',
)
(line 73)

Default iotions for default backend

  • access: protected
Zend_Cache_Core $_frontend = null (line 49)

Cache frontend API

  • access: protected
string $_idPrefix = '' (line 42)
  • access: protected
array $_requestProcessors = array() (line 84)

List of available request processors

  • access: protected
array $_shmBackends = array(
'apc', 'memcached', 'xcache',
'zendserver_shmem', 'zendserver_disk', 'varien_eaccelerator',
)
(line 56)

Shared memory backend models list (required TwoLevels backend model)

  • access: protected
Methods
Constructor __construct (line 98)

Class constructor. Initialize cache instance based on options

  • access: public
Mage_Core_Model_Cache __construct ([ $options = array()])
  • array $options
banUse (line 488)

Disable cache usage for specific data type

  • access: public
Mage_Core_Model_Cache banUse (string $typeCode)
  • string $typeCode
canUse (line 466)

Check if cache can be used for specific data type

  • access: public
bool canUse (string $typeCode)
  • string $typeCode
clean (line 379)

Clean cached data by specific tag

  • access: public
bool clean ([array $tags = array()])
  • array $tags
cleanType (line 608)

Clean cached data for specific cache type

  • access: public
void cleanType ($typeCode $typeCode)
  • $typeCode $typeCode
flush (line 399)

Clean cached data by specific tag

  • access: public
bool flush ()
getDbAdapter (line 410)

Get adapter for database cache backend model

  • access: public
Zend_Db_Adapter_Abstract getDbAdapter ()
getDbAdapterOptions (line 214)

Get options for database backend type

  • access: protected
array getDbAdapterOptions ()
getFrontend (line 326)

Get cache frontend API object

  • access: public
Zend_Cache_Core getFrontend ()
getInvalidatedTypes (line 569)

Get array of all invalidated cache types

  • access: public
array getInvalidatedTypes ()
getTagsByType (line 500)

Get cache tags by cache type from configuration

  • access: public
array getTagsByType (string $type)
  • string $type
getTypes (line 518)

Get information about all declared cache types

  • access: public
array getTypes ()
invalidateType (line 590)

Mark specific cache type(s) as invalidated

  • access: public
void invalidateType (string|array $typeCode)
  • string|array $typeCode
load (line 337)

Load data from cache by id

  • access: public
string load (string $id)
  • string $id
processRequest (line 624)

Try to get response body from cache storage with predefined processors

  • access: public
bool processRequest ()
remove (line 368)

Remove cached data by identifier

  • access: public
bool remove (string $id)
  • string $id
save (line 351)

Save data

  • access: public
bool save (string $data, string $id, [array $tags = array()], [int $lifeTime = null])
  • string $data
  • string $id
  • array $tags
  • int $lifeTime
saveOptions (line 453)

Save cache usage options

  • access: public
Mage_Core_Model_Cache saveOptions (array $options)
  • array $options
_getBackendOptions (line 130)

Get cache backend options. Result array contain backend type ('type' key) and backend options ('options')

  • access: protected
array _getBackendOptions ( $cacheOptions)
  • array $cacheOptions
_getFrontendOptions (line 277)

Get options of cache frontend (options of Zend_Cache_Core)

  • access: protected
array _getFrontendOptions ( $cacheOptions)
  • array $cacheOptions
_getInvalidatedTypes (line 541)

Get invalidate types codes

  • access: protected
array _getInvalidatedTypes ()
_getProcessor (line 648)

Get request processor object

  • access: protected
void _getProcessor ( $processor)
  • $processor
_getResource (line 420)

Get cache resource model

  • access: protected
_getTwoLevelsBackendOptions (line 229)

Initialize two levels backend model options

  • access: protected
array _getTwoLevelsBackendOptions (array $fastOptions, array $cacheOptions)
  • array $fastOptions: fast level backend type and options
  • array $cacheOptions: all cache options
_id (line 299)

Prepare unified valid identifier with preffix

  • access: protected
string _id (string $id)
  • string $id
_initOptions (line 430)

Initialize cache types options

  • access: protected
Mage_Core_Model_Cache _initOptions ()
_saveInvalidatedTypes (line 558)

Save invalicated cache types

  • access: protected
Mage_Core_Model_Cache _saveInvalidatedTypes (array $types)
  • array $types
_tags (line 313)

Prepare cache tags.

  • access: protected
array _tags ([array $tags = array()])
  • array $tags
Class Constants
DEFAULT_LIFETIME = 7200 (line 34)
INVALIDATED_TYPES = 'core_cache_invalidate' (line 36)
OPTIONS_CACHE_ID = 'core_cache_options' (line 35)
XML_PATH_TYPES = 'global/cache/types' (line 37)

Documentation generated on Fri, 11 Feb 2011 16:57:14 +0200 by phpDocumentor 1.4.3