read ()

Reads a cache.

Access

public

Returns

Type

Description

mixed

Either the content of the cache object, or boolean false.

Source

Method defined in lib/cachecore/cachepdo.class.php | Toggle source view (19 lines) | View on GitHub

public function read()
{
    if (!$this->store_read)
    {
        $this->read->bindParam(':id', $this->id);
        $this->read->execute();
        $this->store_read = $this->read->fetch(PDO::FETCH_ASSOC);
    }

    if ($this->store_read)
    {
        $data = $this->store_read['data'];
        $data = $this->gzip ? gzuncompress($data) : $data;

        return unserialize($data);
    }

    return false;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback