Navigation Menu

Skip to content

Commit

Permalink
in the event of a cache-write error include the engine name
Browse files Browse the repository at this point in the history
Especially if the engine is a variable, it's important to know which
engine had a problem writing to the cache
  • Loading branch information
AD7six committed Apr 17, 2011
1 parent 65121a4 commit eb66cd3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Cake/Cache/Cache.php
Expand Up @@ -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.
Expand Down Expand Up @@ -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
);
}
Expand Down

0 comments on commit eb66cd3

Please sign in to comment.