summaryrefslogtreecommitdiff
path: root/it_cache.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_cache.class')
-rw-r--r--it_cache.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_cache.class b/it_cache.class
index da5114f..7c5816f 100644
--- a/it_cache.class
+++ b/it_cache.class
@@ -83,12 +83,12 @@ static function put($key, $value, $p = array())
if ($p['distributed'] && ($memcache = it_cache::_get_memcache($p)))
$success = @$memcache->set($key, $value, $p['ttl']);
else
- $success = ($func = self::$_store_func) ? $func($key, $value, $p['ttl']) : null;
+ $success = !count(($func = self::$_store_func) ? ($errors = $func([$key => $value], null, $p['ttl'])) : ['noapcu']);
if (!$success && $p['safety'] == 1)
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",
- 'body' => "key='$key'",
+ 'body' => ['key' => $key, 'errors' => $errors],
'id' => $p['distributed'] ? "it_cache_fail_" . $memcache->getServerByKey($key)['host'] : "it_cache_fail",
'timewindow' => "1200-1300",
'blockmailid' => $memcache ? "memcache_on_" . $memcache->getServerByKey($key)['host'] : null,