implementing key/value store of Persistance in Database storage
This commit is contained in:
@@ -38,15 +38,6 @@ class Filesystem extends AbstractData
|
||||
*/
|
||||
private static $_path = 'data';
|
||||
|
||||
/**
|
||||
* cache for the traffic limiter
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @var array
|
||||
*/
|
||||
private static $_traffic_limiter_cache = array();
|
||||
|
||||
/**
|
||||
* get instance of singleton
|
||||
*
|
||||
@@ -249,27 +240,6 @@ class Filesystem extends AbstractData
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge outdated entries.
|
||||
*
|
||||
* @access public
|
||||
* @param string $namespace
|
||||
* @param int $time
|
||||
* @return void
|
||||
*/
|
||||
public function purgeValues($namespace, $time)
|
||||
{
|
||||
switch ($namespace) {
|
||||
case 'traffic_limiter':
|
||||
foreach (self::$_traffic_limiter_cache as $key => $last_access) {
|
||||
if ($last_access <= $time) {
|
||||
unset(self::$_traffic_limiter_cache[$key]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save a value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user