Skip to content

Commit

Permalink
cache debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed May 7, 2014
1 parent 7c24fd0 commit 15b539f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Cache.php
Expand Up @@ -8,6 +8,11 @@
*/
class Cache
{
/**
* @var bool
*/
public $debug = false;

/**
* cache container
* @var array
Expand All @@ -23,7 +28,8 @@ class Cache
*/
protected function getKey($class, $method, $arguments)
{
return md5($class .' '. $method . ' ' . implode(' ', $arguments));
$key = $class . '::' . $method . '(' . implode(', ', $arguments) . ')';
return $this->debug ? $key : md5($key);
}

/**
Expand Down

0 comments on commit 15b539f

Please sign in to comment.