15 'Magento\Framework\Cache\Backend\Eaccelerator::clean() : tags are unsupported by the Eaccelerator backend';
18 'Magento\Framework\Cache\Backend\Eaccelerator::save() : tags are unsupported by the Eaccelerator backend';
28 if (!extension_loaded(
'eaccelerator')) {
44 public function load(
$id, $doNotTestCacheValidity =
false)
46 $tmp = eaccelerator_get(
$id);
61 $tmp = eaccelerator_get(
$id);
80 public function save(
$data,
$id, $tags = [], $specificLifetime =
false)
84 if (count($tags) > 0) {
85 $this->
_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND);
96 public function remove(
$id)
98 return eaccelerator_rm(
$id);
120 case \Zend_Cache::CLEANING_MODE_ALL:
121 return eaccelerator_clean();
123 case \Zend_Cache::CLEANING_MODE_OLD:
125 "Magento\Framework\Cache\Backend\Eaccelerator::clean() : ".
126 "CLEANING_MODE_OLD is unsupported by the Eaccelerator backend" 129 case \Zend_Cache::CLEANING_MODE_MATCHING_TAG:
130 case \Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG:
131 case \Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG:
132 $this->
_log(self::TAGS_UNSUPPORTED_BY_CLEAN_OF_EACCELERATOR_BACKEND);
148 $mem = eaccelerator_info();
149 $memSize = $mem[
'memorySize'];
150 $memAvailable = $mem[
'memoryAvailable'];
151 $memUsed = $memSize - $memAvailable;
155 if ($memUsed > $memSize) {
158 return (
int)(100. * ($memUsed / $memSize));
168 $this->
_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND);
183 $this->
_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND);
198 $this->
_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND);
213 $this->
_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND);
226 $array = eaccelerator_list_keys();
227 foreach ($array as $key =>
$info) {
247 $tmp = eaccelerator_get(
$id);
248 if (is_array($tmp)) {
251 if (!isset($tmp[2])) {
257 return [
'expire' => $mtime + $lifetime,
'tags' => [],
'mtime' => $mtime];
271 $tmp = eaccelerator_get(
$id);
272 if (is_array($tmp)) {
275 if (!isset($tmp[2])) {
281 $newLifetime = $lifetime - (
time() - $mtime) + $extraLifetime;
282 if ($newLifetime <= 0) {
285 eaccelerator_put(
$id, [
$data,
time(), $newLifetime], $newLifetime);
308 'automatic_cleaning' =>
false,
310 'expired_read' =>
false,
312 'infinite_lifetime' =>
false,
getIdsMatchingAnyTags($tags=[])
const TAGS_UNSUPPORTED_BY_CLEAN_OF_EACCELERATOR_BACKEND
load($id, $doNotTestCacheValidity=false)
clean($mode=\Zend_Cache::CLEANING_MODE_ALL, $tags=[])
save($data, $id, $tags=[], $specificLifetime=false)
_log($message, $priority=4)
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
static throwException($msg, Exception $e=null)
const TAGS_UNSUPPORTED_BY_SAVE_OF_EACCELERATOR_BACKEND
__construct(array $options=[])
touch($id, $extraLifetime)
foreach( $_productCollection as $_product)() ?>" class $info
getIdsMatchingTags($tags=[])
getIdsNotMatchingTags($tags=[])
getLifetime($specificLifetime)