mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
2119a50a2e
commit
3c07d94a47
@ -83,6 +83,9 @@ public function cache_value($Key, $Value, $Duration = 2592000) {
|
||||
if (!$this->set($Key, $Value, 0, $Duration)) {
|
||||
trigger_error("Cache insert failed for key $Key");
|
||||
}
|
||||
if (array_key_exists($Key, $this->CacheHits)) {
|
||||
$this->CacheHits[$Key] = $Value;
|
||||
}
|
||||
$this->Time += (microtime(true) - $StartTime) * 1000;
|
||||
}
|
||||
|
||||
@ -97,6 +100,9 @@ public function add_value($Key, $Value, $Duration = 2592000) {
|
||||
public function replace_value($Key, $Value, $Duration = 2592000) {
|
||||
$StartTime = microtime(true);
|
||||
$this->replace($Key, $Value, false, $Duration);
|
||||
if (array_key_exists($Key, $this->CacheHits)) {
|
||||
$this->CacheHits[$Key] = $Value;
|
||||
}
|
||||
$this->Time += (microtime(true) - $StartTime) * 1000;
|
||||
}
|
||||
|
||||
@ -163,12 +169,16 @@ public function delete_value($Key) {
|
||||
if (!$this->delete($Key)) {
|
||||
//trigger_error("Cache delete failed for key $Key");
|
||||
}
|
||||
unset($this->CacheHits[$Key]);
|
||||
$this->Time += (microtime(true) - $StartTime) * 1000;
|
||||
}
|
||||
|
||||
public function increment_value($Key, $Value = 1) {
|
||||
$StartTime = microtime(true);
|
||||
$this->increment($Key, $Value);
|
||||
$NewVal = $this->increment($Key, $Value);
|
||||
if (isset($this->CacheHits[$Key])) {
|
||||
$this->CacheHits[$Key] = $NewVal;
|
||||
}
|
||||
$this->Time += (microtime(true) - $StartTime) * 1000;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user