mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 04:48:53 +00:00
[ticket/11230] Update cache driver dock blocks
PHPBB3-12230
This commit is contained in:
parent
60e5757fa1
commit
b87fc1e56c
3 changed files with 32 additions and 0 deletions
24
phpBB/phpbb/cache/driver/driver_interface.php
vendored
24
phpBB/phpbb/cache/driver/driver_interface.php
vendored
|
@ -18,6 +18,8 @@ interface driver_interface
|
|||
{
|
||||
/**
|
||||
* Load global cache
|
||||
*
|
||||
* @return mixed False if an error was encountered, otherwise the data type of the cached data
|
||||
*/
|
||||
public function load();
|
||||
|
||||
|
@ -28,36 +30,58 @@ interface driver_interface
|
|||
|
||||
/**
|
||||
* Save modified objects
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function save();
|
||||
|
||||
/**
|
||||
* Tidy cache
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function tidy();
|
||||
|
||||
/**
|
||||
* Get saved cache object
|
||||
*
|
||||
* @param string $var_name Cache key
|
||||
* @return mixed False if an error was encountered, otherwise the saved cached object
|
||||
*/
|
||||
public function get($var_name);
|
||||
|
||||
/**
|
||||
* Put data into cache
|
||||
*
|
||||
* @param string $var_name Cache key
|
||||
* @param mixed $var Cached data to store
|
||||
* @param int $ttl Time-to-live of cached data
|
||||
*/
|
||||
public function put($var_name, $var, $ttl = 0);
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function purge();
|
||||
|
||||
/**
|
||||
* Destroy cache data
|
||||
*
|
||||
* @param string $var_name Cache key
|
||||
* @param string $table Table name
|
||||
* @return null
|
||||
*/
|
||||
public function destroy($var_name, $table = '');
|
||||
|
||||
/**
|
||||
* Check if a given cache entry exists
|
||||
*
|
||||
* @param string $var_name Cache key
|
||||
*
|
||||
* @return bool True if cache file exists and has not expired.
|
||||
* False otherwise.
|
||||
*/
|
||||
public function _exists($var_name);
|
||||
|
||||
|
|
4
phpBB/phpbb/cache/driver/file.php
vendored
4
phpBB/phpbb/cache/driver/file.php
vendored
|
@ -758,6 +758,10 @@ class file extends \phpbb\cache\driver\base
|
|||
|
||||
/**
|
||||
* Removes/unlinks file
|
||||
*
|
||||
* @param string $filename Filename to remove
|
||||
* @param bool $check Check file permissions
|
||||
* @return bool True if the file was successfully removed, otherwise false
|
||||
*/
|
||||
function remove_file($filename, $check = false)
|
||||
{
|
||||
|
|
4
phpBB/phpbb/cache/driver/memory.php
vendored
4
phpBB/phpbb/cache/driver/memory.php
vendored
|
@ -400,6 +400,10 @@ abstract class memory extends \phpbb\cache\driver\base
|
|||
|
||||
/**
|
||||
* Removes/unlinks file
|
||||
*
|
||||
* @param string $filename Filename to remove
|
||||
* @param bool $check Check file permissions
|
||||
* @return bool True if the file was successfully removed, otherwise false
|
||||
*/
|
||||
function remove_file($filename, $check = false)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue