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

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

Test if a cache is available or not (for the given id)
public test ( string $id ) : mixed | false
$id string Cache id
Результат mixed | false (a cache is not available) or "last modified" timestamp (int) of the available cache record
    public function test($id)
    {
        try {
            $cursor = $this->get($id);
            if ($tmp = $cursor->getNext()) {
                return $tmp['created_at'];
            }
        } catch (\Exception $e) {
            return false;
        }
        return false;
    }