27 #require_once 'Zend/Cache/Backend/ExtendedInterface.php'; 32 #require_once 'Zend/Cache/Backend.php'; 61 private $_log = array();
78 $this->_addLog(
'construct', array(
$options));
89 $this->_addLog(
'setDirectives', array($directives));
103 public function load(
$id, $doNotTestCacheValidity =
false)
105 $this->_addLog(
'get', array(
$id, $doNotTestCacheValidity));
108 ||
$id ==
'd8523b3ee441006261eeffa5c3d3a0a7' 109 ||
$id ==
'e83249ea22178277d5befc2c5e2e9ace' 110 ||
$id ==
'40f649b94977c0a6e76902e2a0b43587' 111 ||
$id ==
'88161989b73a4cbfd0b701c446115a99' 112 ||
$id ==
'205fc79cba24f0f0018eb92c7c8b3ba4' 113 ||
$id ==
'170720e35f38150b811f68a937fb042d')
117 if (
$id==
'serialized') {
118 return serialize(array(
'foo'));
120 if (
$id==
'serialized2') {
121 return serialize(array(
'headers' => array(),
'data' =>
'foo'));
123 if (
$id ==
'71769f39054f75894288e397df04e445' ||
$id ==
'615d222619fb20b527168340cebd0578' 124 ||
$id ==
'8a02d218a5165c467e7a5747cc6bd4b6' ||
$id ==
'648aca1366211d17cbf48e65dc570bee' 125 ||
$id ==
'4a923ef02d7f997ca14d56dfeae25ea7') {
126 return serialize(array(
'foo',
'bar'));
128 if (
$id ==
'f53c7d912cc523d9a65834c8286eceb9') {
129 return serialize(array(
'foobar'));
145 $this->_addLog(
'test', array(
$id));
149 if ((
$id==
'3c439c922209e2cb0b54d6deffccd75a')) {
167 public function save(
$data,
$id, $tags = array(), $specificLifetime =
false)
169 $this->_addLog(
'save', array(
$data,
$id, $tags));
170 if (substr(
$id,-5)==
'false') {
185 public function remove(
$id)
187 $this->_addLog(
'remove', array(
$id));
188 if (substr(
$id,-5)==
'false') {
214 $this->_addLog(
'clean', array(
$mode, $tags));
215 if (
$mode==
'false') {
228 return $this->
_log[$this->_index - 1];
238 return $this->_index;
269 'prefix_id1',
'prefix_id2' 295 if ($tags == array(
'tag1',
'tag2')) {
296 return array(
'prefix_id1',
'prefix_id2');
312 if ($tags == array(
'tag3',
'tag4')) {
313 return array(
'prefix_id3',
'prefix_id4');
329 if ($tags == array(
'tag5',
'tag6')) {
330 return array(
'prefix_id5',
'prefix_id6');
391 'automatic_cleaning' =>
true,
393 'expired_read' =>
false,
395 'infinite_lifetime' =>
true,
407 private function _addLog($methodName, $args)
409 $this->
_log[$this->_index] = array(
410 'methodName' => $methodName,
413 $this->_index = $this->_index + 1;
save($data, $id, $tags=array(), $specificLifetime=false)
getIdsNotMatchingTags($tags=array())
isAutomaticCleaningAvailable()
_log($message, $priority=4)
__construct($options=array())
getIdsMatchingTags($tags=array())
setDirectives($directives)
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
touch($id, $extraLifetime)
clean($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array())
getIdsMatchingAnyTags($tags=array())
load($id, $doNotTestCacheValidity=false)