remove item caching from cache manager.
This commit is contained in:
parent
5f3d40b76c
commit
23d5742575
|
@ -9,13 +9,6 @@ class Cache {
|
|||
*/
|
||||
public static $drivers = array();
|
||||
|
||||
/**
|
||||
* All of the items retrieved by the cache drivers.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $items = array();
|
||||
|
||||
/**
|
||||
* Get a cache driver instance. If no driver name is specified, the default
|
||||
* cache driver will be returned as defined in the cache configuration file.
|
||||
|
@ -66,9 +59,9 @@ public static function driver($driver = null)
|
|||
*/
|
||||
public static function get($key, $default = null, $driver = null)
|
||||
{
|
||||
if (isset(static::$items[$driver][$key]))
|
||||
if (is_null($driver))
|
||||
{
|
||||
return static::$items[$driver][$key];
|
||||
$driver = Config::get('cache.driver');
|
||||
}
|
||||
|
||||
if (is_null($item = static::driver($driver)->get($key)))
|
||||
|
@ -76,7 +69,7 @@ public static function get($key, $default = null, $driver = null)
|
|||
return is_callable($default) ? call_user_func($default) : $default;
|
||||
}
|
||||
|
||||
return static::$items[$driver][$key] = $item;
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -91,7 +84,7 @@ public static function get($key, $default = null, $driver = null)
|
|||
*/
|
||||
public static function remember($key, $default, $minutes, $driver = null)
|
||||
{
|
||||
if ( ! is_null($item = static::get($key)))
|
||||
if ( ! is_null($item = static::get($key, null, $driver)))
|
||||
{
|
||||
return $item;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue