mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[ticket/16955] Add stubs for cache classes and clean up
PHPBB3-16955
This commit is contained in:
24
phpBB/phpbb/cache/driver/memory.php
vendored
24
phpBB/phpbb/cache/driver/memory.php
vendored
@@ -270,13 +270,33 @@ abstract class memory extends \phpbb\cache\driver\base
|
||||
/**
|
||||
* Check if a cache var exists
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
*
|
||||
* @return bool True if it exists, otherwise false
|
||||
*/
|
||||
function _isset($var)
|
||||
protected function _isset(string $var): bool
|
||||
{
|
||||
// Most caches don't need to check
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the cache
|
||||
*
|
||||
* @param string $var Cache key
|
||||
*
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
abstract protected function _delete(string $var): bool;
|
||||
|
||||
/**
|
||||
* Store data in the cache
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
abstract protected function _write(string $var, $data, int $ttl = 2592000): bool;
|
||||
}
|
||||
|
Reference in New Issue
Block a user