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
This commit is contained in:
AD7six 2011-04-17 11:44:46 +02:00
parent 65121a4292
commit eb66cd352e

View file

@ -96,7 +96,7 @@ class Cache {
* - `duration` Specify how long items in this cache configuration last. * - `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 * - `prefix` Prefix appended to all entries. Good for when you need to share a keyspace
* with either another cache config or annother application. * 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. * cache::gc from ever being called automatically.
* - `servers' Used by memcache. Give the address of the memcached servers to use. * - `servers' Used by memcache. Give the address of the memcached servers to use.
* - `compress` Used by memcache. Enables memcache's compressed format. * - `compress` Used by memcache. Enables memcache's compressed format.
@ -298,7 +298,12 @@ class Cache {
self::set(null, $config); self::set(null, $config);
if ($success === false && $value !== '') { if ($success === false && $value !== '') {
trigger_error( 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 E_USER_WARNING
); );
} }