Author: Elliot Levin (elliotlevin@hotmail.com)
Exemplo n.º 1
0
 public function testThatDevelopmentModeWillClearTheCacheOnce()
 {
     $functionCacheMock = $this->getMock('Pinq\\Caching\\ICacheAdapter');
     $functionCacheMock->expects($this->once())->method('clear');
     Caching\CacheProvider::setCustomCache($functionCacheMock);
     Caching\CacheProvider::setDevelopmentMode(true);
     //Should clear
     Caching\CacheProvider::getCache();
     //Should not clear again
     Caching\CacheProvider::getCache();
 }
Exemplo n.º 2
0
 protected function buildQueryCache()
 {
     return Caching\CacheProvider::getCache();
 }
Exemplo n.º 3
0
 protected function buildCompiledQueryCache()
 {
     return Caching\CacheProvider::getCacheAdapter()->forNamespace(get_class($this));
 }