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

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

Attempt to get the cached value associated with the supplied key
public tryGet ( string $key ) : mixed
$key string
Результат mixed
    public function tryGet($key);

Usage Example

Пример #1
0
 public function tryGet($hash)
 {
     if (!isset(self::$secondLevelCache[$hash])) {
         self::$secondLevelCache[$hash] = $this->cacheAdapter->tryGet($hash) ?: null;
     }
     $cachedValue = self::$secondLevelCache[$hash];
     return $cachedValue instanceof IQuery ? $cachedValue : null;
 }
All Usage Examples Of Pinq\Caching\ICacheAdapter::tryGet