added network specs request
This commit is contained in:
@@ -235,10 +235,10 @@ class GenieACS {
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function getCache($key) {
|
||||
private function getCache($key, $ttl = 3300) {
|
||||
$file = TEMP_DIR . "/RadiusCache/" . md5($key) . ".json";
|
||||
if (file_exists($file)) {
|
||||
if (filemtime($file) < (time() - 1800)) {
|
||||
if (filemtime($file) < (time() - $ttl)) {
|
||||
@unlink($file);
|
||||
return null;
|
||||
}
|
||||
@@ -247,6 +247,14 @@ class GenieACS {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getCachePublic($key, $ttl = 3300) {
|
||||
return $this->getCache($key, $ttl);
|
||||
}
|
||||
|
||||
public function setCachePublic($key, $data) {
|
||||
$this->setCache($key, $data);
|
||||
}
|
||||
|
||||
private function setCache($key, $data) {
|
||||
$dir = TEMP_DIR . "/RadiusCache/";
|
||||
if (!is_dir($dir)) @mkdir($dir, 0777, true);
|
||||
|
||||
Reference in New Issue
Block a user