Pinq\Caching\CacheProvider::getCache PHP Метод

getCache() публичный статический Метод

Returns a query cache with the configured adapter.
public static getCache ( ) : Pinq\Caching\IQueryCache
Результат Pinq\Caching\IQueryCache
    public static function getCache()
    {
        return new QueryCache(self::getImplementation());
    }

Usage Example

Пример #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();
 }
All Usage Examples Of Pinq\Caching\CacheProvider::getCache