Pimcore\Cache\Backend\Mongodb::load PHP Метод

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

Test if a cache is available for the given id and (if yes) return it (false else)
public load ( string $id, boolean $doNotTestCacheValidity = false ) : string | false
$id string Cache id
$doNotTestCacheValidity boolean If set to true, the cache validity won't be tested
Результат string | false cached datas
    public function load($id, $doNotTestCacheValidity = false)
    {
        try {
            $cursor = $this->get($id);
            if ($tmp = $cursor->getNext()) {
                if ($doNotTestCacheValidity || !$doNotTestCacheValidity && $tmp['created_at'] + $tmp['l'] >= time()) {
                    return $tmp['d'];
                }
                return false;
            }
        } catch (\Exception $e) {
            return false;
        }
        return false;
    }