From eb66cd352e1d939ad4248e54df3aa36cf67cbe36 Mon Sep 17 00:00:00 2001 From: AD7six Date: Sun, 17 Apr 2011 11:44:46 +0200 Subject: [PATCH] in the event of a cache-write error include the engine name Especially if the engine is a variable, it's important to know which engine had a problem writing to the cache --- lib/Cake/Cache/Cache.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index 2ffdeb007e1..5cc02ad4dc7 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -96,7 +96,7 @@ class Cache { * - `duration` Specify how long items in this cache configuration last. * - `prefix` Prefix appended to all entries. Good for when you need to share a keyspace * with either another cache config or annother application. - * - `probability` Probability of hitting a cache gc cleanup. Setting to 0 will disable + * - `probability` Probability of hitting a cache gc cleanup. Setting to 0 will disable * cache::gc from ever being called automatically. * - `servers' Used by memcache. Give the address of the memcached servers to use. * - `compress` Used by memcache. Enables memcache's compressed format. @@ -298,7 +298,12 @@ public static function write($key, $value, $config = 'default') { self::set(null, $config); if ($success === false && $value !== '') { trigger_error( - __d('cake_dev', "%s cache was unable to write '%s' to cache", $config, $key), + __d('cake_dev', + "%s cache was unable to write '%s' to %s cache", + $config, + $key, + self::$_engines[$config]->settings['engine'] + ), E_USER_WARNING ); }