inGlobalNamespace() public method

Returns a new cache implementation for the global namespace.
public inGlobalNamespace ( ) : Pinq\Caching\ICacheAdapter
return Pinq\Caching\ICacheAdapter
Beispiel #1
0
 public function testThaGlobalNamespaceCacheWillNotClearOtherNamespaces()
 {
     $childNamespaceCache = $this->namespacedCache->forNamespace('CHILD::namespace');
     $childNamespaceCache->save('in-child-namespace-1', 1);
     $childNamespaceCache->save('in-child-namespace-2', 2);
     $this->namespacedCache->save('in-namespace', 2);
     $this->cache->inGlobalNamespace()->clear();
     $this->assertFalse($this->namespacedCache->contains('in-namespace'));
     $this->assertFalse($childNamespaceCache->contains('in-child-namespace-1'));
     $this->assertFalse($childNamespaceCache->contains('in-child-namespace-2'));
 }