Skip to content

Commit

Permalink
Namespace and TTL not needed in MemoryCache adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed May 26, 2017
1 parent 99eff95 commit 83943ce
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions system/src/Grav/Framework/Cache/Adapter/MemoryCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Grav\Framework\Cache\AbstractCache;

/**
* Cache class for PSR-16 compatible "Simple Cache" implementation using memory backend.
* Cache class for PSR-16 compatible "Simple Cache" implementation using in memory backend.
* Memory backend does not use namespace or ttl as the cache is unique to each cache object and request.
*
* @package Grav\Framework\Cache
Expand All @@ -21,15 +21,11 @@ class MemoryCache extends AbstractCache
protected $cache = [];

/**
* Doctrine Cache constructor.
*
* @param string $namespace
* @param null|int|\DateInterval $defaultLifetime
* Memory Cache constructor.
*/
public function __construct($namespace = '', $defaultLifetime = null)
public function __construct()
{
// Do not use $namespace or $defaultLifetime directly, store them with constructor and fetch with methods.
parent::__construct($namespace, $defaultLifetime);
parent::__construct();
}

protected function doGet($key, $default)
Expand Down

0 comments on commit 83943ce

Please sign in to comment.