diff options
| author | Urban Müller | 2026-02-24 18:03:22 +0100 |
|---|---|---|
| committer | Urban Müller | 2026-02-24 18:03:22 +0100 |
| commit | 0502c90cb0c94fc52dbb383430c0fc6abd2d4d48 (patch) | |
| tree | cd070dbb787aa57425551cc200a43500c1c27249 | |
| parent | 55ea8bbbddf3d44d48c954253e3598cdd301807e (diff) | |
| download | itools-master.tar.gz itools-master.tar.bz2 itools-master.zip | |
| -rw-r--r-- | it_cache.class | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/it_cache.class b/it_cache.class index 3bfe1c3..51e634d 100644 --- a/it_cache.class +++ b/it_cache.class @@ -84,14 +84,17 @@ static function put($key, $value, $p = array()) $success = ($func = self::$_store_func) ? $func($key, $value, $p['ttl']) : null; if ($memsuccess === false && $p['safety'] == 1) + { + $message = $memcache ? $memcache->getResultMessage() . " on " . $memcache->getServerByKey($key)['host'] : "n/a"; it::error(array_filter([ - 'title' => ($p['distributed'] ? "memcache (" . ($memcache ? ($memcache->getResultMessage() . " on " . $memcache->getServerByKey($key)['host']) : "n/a") . ")" : self::$_store_func) . " in it_cache::put failed", + 'title' => ($p['distributed'] ? "memcache ($message)" : self::$_store_func) . " in it_cache::put failed", 'body' => "key='$key', value size=" . strlen(json_encode($value)), 'id' => $p['distributed'] ? "it_cache_fail_" . $memcache->getServerByKey($key)['host'] : "it_cache_fail", - 'timewindow' => $memcache && it::match('SERVER HAS FAILED|CONNECTION FAILURE', $memcache->getResultMessage()) ? "1200-1300" : null, + 'timewindow' => $memcache && it::match('SERVER HAS FAILED|CONNECTION FAILURE|TIMEOUT OCCURRED', $message) ? "1200-1300" : null, 'blockmailid' => $memcache ? "memcache_on_" . $memcache->getServerByKey($key)['host'] : null, 'blockmail' => $memcache? 12*3600 : null, ])); + } it_cache::$_local[$key] = $value; # Also store local copy |