[ticket/11230] Update cache driver dock blocks

PHPBB3-12230
This commit is contained in:
Matt Friedman 2014-03-22 08:23:18 -07:00
parent 60e5757fa1
commit b87fc1e56c
3 changed files with 32 additions and 0 deletions

View file

@ -18,6 +18,8 @@ interface driver_interface
{ {
/** /**
* Load global cache * Load global cache
*
* @return mixed False if an error was encountered, otherwise the data type of the cached data
*/ */
public function load(); public function load();
@ -28,36 +30,58 @@ interface driver_interface
/** /**
* Save modified objects * Save modified objects
*
* @return null
*/ */
public function save(); public function save();
/** /**
* Tidy cache * Tidy cache
*
* @return null
*/ */
public function tidy(); public function tidy();
/** /**
* Get saved cache object * 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); public function get($var_name);
/** /**
* Put data into cache * 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); public function put($var_name, $var, $ttl = 0);
/** /**
* Purge cache data * Purge cache data
*
* @return null
*/ */
public function purge(); public function purge();
/** /**
* Destroy cache data * Destroy cache data
*
* @param string $var_name Cache key
* @param string $table Table name
* @return null
*/ */
public function destroy($var_name, $table = ''); public function destroy($var_name, $table = '');
/** /**
* Check if a given cache entry exists * 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); public function _exists($var_name);

View file

@ -758,6 +758,10 @@ class file extends \phpbb\cache\driver\base
/** /**
* Removes/unlinks file * 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) function remove_file($filename, $check = false)
{ {

View file

@ -400,6 +400,10 @@ abstract class memory extends \phpbb\cache\driver\base
/** /**
* Removes/unlinks file * 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) function remove_file($filename, $check = false)
{ {