mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Implementation of an experimental cache manager.
git-svn-id: file:///svn/phpbb/trunk@3313 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
85b196b5fe
commit
4533fba0fc
1 changed files with 1 additions and 19 deletions
|
@ -19,10 +19,6 @@
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
//
|
|
||||||
// This class is part of the Advanced Cache Manager
|
|
||||||
//
|
|
||||||
|
|
||||||
class acm
|
class acm
|
||||||
{
|
{
|
||||||
var $vars = '';
|
var $vars = '';
|
||||||
|
@ -90,21 +86,7 @@ class acm
|
||||||
|
|
||||||
function load($varname, $expire_time = 0)
|
function load($varname, $expire_time = 0)
|
||||||
{
|
{
|
||||||
if (!is_array($this->vars))
|
return (exists($varname, $expire_time)) ? $this->vars[$varname] : null;
|
||||||
{
|
|
||||||
$this->load_cache();
|
|
||||||
}
|
|
||||||
if (isset($this->vars[$varname]))
|
|
||||||
{
|
|
||||||
if ($expire_time && time() - $this->vars_ts[$varname] > $expire_time)
|
|
||||||
{
|
|
||||||
$this->destroy($varname);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return $this->vars[$varname];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function exists($varname, $expire_time = 0)
|
function exists($varname, $expire_time = 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue