implementing key/value store of Persistance in Database storage

This commit is contained in:
El RIDO
2021-06-09 07:47:40 +02:00
parent 7901ec74a7
commit a203e6322b
8 changed files with 86 additions and 65 deletions

View File

@@ -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.
*