Handles caching queries and loading results from the cache.
Used by Cake\Datasource\QueryTrait internally.
$_config
protected string|Cake\Cache\CacheEngine
$_key
protected string|callable
__construct( string|Closure $key , string|Cake\Cache\CacheEngine $config )
Constructor.
$key
Cake\Cache\CacheEngine
$config
_resolveCacher( )
Get the cache engine.
Cake\Cache\CacheEngine
_resolveKey( object $query )
Get/generate the cache key.
$query
fetch( object $query )
Load the cached results from the cache or run the query.
$query
Cake\ORM\ResultSet
|nullstore( object $query , Traversable $results )
Store the result set into the cache.
$query
$results
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Datasource.QueryCacher.html