mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Optimisation no 5: cache events totals for 5min + sql optimization
This commit is contained in:
@@ -811,21 +811,5 @@ function getDeviceCondition ($deviceStatus) {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Simple cookie cache
|
||||
//------------------------------------------------------------------------------
|
||||
function getCache($key) {
|
||||
if( isset($_COOKIE[$key]))
|
||||
{
|
||||
return $_COOKIE[$key];
|
||||
}else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function setCache($key, $value) {
|
||||
setcookie($key, $value, time()+300, "/","", 0); // 5min cache
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user