BlackHole() public static method

NOTE: BlackHole driver turns off the cache.
public static BlackHole ( ) : CacheStorage
return CacheStorage
Example #1
0
 public function testRegisterCacheDriver()
 {
     ClassLoader::getInstance()->registerCacheDriver(Cache::BlackHole());
     $autoloaders = spl_autoload_functions();
     $this->assertSame('getClassFromCache', $autoloaders[0][1]);
 }
Example #2
0
 public function testSetGetCacheAsCacheObject()
 {
     $nullCache = Cache::BlackHole();
     Router::getInstance()->setCache($nullCache);
     $this->assertInstanceOf('\\Webiny\\Component\\Cache\\CacheStorage', Router::getInstance()->getCache());
 }