public function get($key, $age = false)
    {
        $file = $this->filename($key);

        if (is_file($file)) {
            if ($age) {
                $age = filemtime($file) + $this->config['age'] > time();
            }

            if (!$age) {
                // json
                // text
                return unserialize(file_get_contents($file));
            }
            return false;
        }
        return null;
    }
public function get($key, $age = false)
    {
        $file = $this->filename($key);

        if (is_file($file)) {
            if ($age) {
                $age = filemtime($file) + $this->config['age'] > time();
            }

            if (!$age) {
                // json
                // text
                return unserialize(file_get_contents($file));
            }
            return false;
        }
        return null;
    }
public function get ( $ key , $ age = false ) { $ file = $ this -> filename ( $ key ) ; if ( is_file ( $ file ) ) { if ( $ age ) { $ age = filemtime ( $ file ) + $ this -> config [ 'age' ] > time ( ) ; } if ( ! $ age ) { // json // text return unserialize ( file_get_contents ( $ file ) ) ; } return false ; } return null ; }
Get an item from the cache if available.

@param string  $key to the cached object.
@param boolean $age check the age or not, defaults to
false.

@return mixed the cached object or false if it has aged
or null if it does not exists.
Get an item from the cache if available .