diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-06-06 22:13:03 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-06-06 22:13:03 +0200 |
commit | 7572bc050baf68f7a384bf8779301b71a7854dc4 (patch) | |
tree | 12a44f36c474f62a9791e66932b57ae4d9c0992f /phpBB/phpbb/cache/driver | |
parent | bc59342e1a2302f75894ab4fd45a8fac990219ea (diff) | |
download | forums-7572bc050baf68f7a384bf8779301b71a7854dc4.tar forums-7572bc050baf68f7a384bf8779301b71a7854dc4.tar.gz forums-7572bc050baf68f7a384bf8779301b71a7854dc4.tar.bz2 forums-7572bc050baf68f7a384bf8779301b71a7854dc4.tar.xz forums-7572bc050baf68f7a384bf8779301b71a7854dc4.zip |
[ticket/16081] Remove eAccelerator cache driver
eAccelerator does not support any PHP version above 5.3.
PHPBB3-16081
Diffstat (limited to 'phpBB/phpbb/cache/driver')
-rw-r--r-- | phpBB/phpbb/cache/driver/eaccelerator.php | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/phpBB/phpbb/cache/driver/eaccelerator.php b/phpBB/phpbb/cache/driver/eaccelerator.php deleted file mode 100644 index 740855144f..0000000000 --- a/phpBB/phpbb/cache/driver/eaccelerator.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -/** -* -* This file is part of the phpBB Forum Software package. -* -* @copyright (c) phpBB Limited <https://www.phpbb.com> -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -namespace phpbb\cache\driver; - -/** -* ACM for eAccelerator -* @todo Missing locks from destroy() talk with David -*/ -class eaccelerator extends \phpbb\cache\driver\memory -{ - var $extension = 'eaccelerator'; - var $function = 'eaccelerator_get'; - - var $serialize_header = '#phpbb-serialized#'; - - /** - * {@inheritDoc} - */ - function purge() - { - foreach (eaccelerator_list_keys() as $var) - { - // @todo Check why the substr() - // @todo Only unset vars matching $this->key_prefix - eaccelerator_rm(substr($var['name'], 1)); - } - - parent::purge(); - } - - /** - * {@inheritDoc} - */ - function tidy() - { - global $config; - - eaccelerator_gc(); - - $config->set('cache_last_gc', time(), false); - } - - /** - * Fetch an item from the cache - * - * @access protected - * @param string $var Cache key - * @return mixed Cached data - */ - function _read($var) - { - $result = eaccelerator_get($this->key_prefix . $var); - - if ($result === null) - { - return false; - } - - // Handle serialized objects - if (is_string($result) && strpos($result, $this->serialize_header . 'O:') === 0) - { - $result = unserialize(substr($result, strlen($this->serialize_header))); - } - - return $result; - } - - /** - * Store data in the cache - * - * @access protected - * @param string $var Cache key - * @param mixed $data Data to store - * @param int $ttl Time-to-live of cached data - * @return bool True if the operation succeeded - */ - function _write($var, $data, $ttl = 2592000) - { - // Serialize objects and make them easy to detect - $data = (is_object($data)) ? $this->serialize_header . serialize($data) : $data; - - return eaccelerator_put($this->key_prefix . $var, $data, $ttl); - } - - /** - * Remove an item from the cache - * - * @access protected - * @param string $var Cache key - * @return bool True if the operation succeeded - */ - function _delete($var) - { - return eaccelerator_rm($this->key_prefix . $var); - } -} |