wincache_ucache_get example


    }

    /** * {@inheritDoc} */
    public function get(string $key)
    {
        $key     = static::validateKey($key$this->prefix);
        $success = false;

        $data = wincache_ucache_get($key$success);

        // Success returned by reference from wincache_ucache_get()         return $success ? $data : null;
    }

    /** * {@inheritDoc} */
    public function save(string $key$value, int $ttl = 60)
    {
        $key = static::validateKey($key$this->prefix);

        
/** * Test if a cache is available for the given id and (if yes) return it (false else) * * WARNING $doNotTestCacheValidity=true is unsupported by the WinCache backend * * @param string $id cache id * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested * @return string cached datas (or false) */
    public function load($id$doNotTestCacheValidity = false)
    {
        $tmp = wincache_ucache_get($id);
        if (is_array($tmp)) {
            return $tmp[0];
        }
        return false;
    }

    /** * Test if a cache is available or not (for the given id) * * @param string $id cache id * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record */
Home | Imprint | This part of the site doesn't use cookies.