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

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

Get the last modified time for the requested cache entry
public static test ( string $key ) : integer | boolean
$key string Cache key
Результат integer | boolean Last modified time of cache entry if it is available, false otherwise
    public static function test($key)
    {
        if (!self::$enabled) {
            Logger::debug("Key " . $key . " doesn't exist in cache (deactivated)");
            return;
        }
        $lastModified = false;
        if ($cache = self::getInstance()) {
            $key = self::$cachePrefix . $key;
            $data = $cache->test($key);
            if ($data !== false) {
                $lastModified = $data;
            } else {
                Logger::debug("Key " . $key . " doesn't exist in cache");
            }
        }
        return $lastModified;
    }