Pinq\Caching\ICacheAdapter::contains PHP Метод

contains() публичный Метод

Returns whether the supplied function has
public contains ( string $key ) : boolean
$key string
Результат boolean
    public function contains($key);

Usage Example

Пример #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'));
 }