public function getFileContents($filename)
    {

        $cachecontents = $this->get($this->cachefilekey($filename));
//        $timestamp = $this->get($this->cachefiletskey($filename));

        if ($cachecontents !== false && is_array($cachecontents)) {

            $contents = array_key_exists('v', $cachecontents)?$cachecontents['v']:false;
            $timestamp = array_key_exists('t', $cachecontents)?$cachecontents['t']:false;

            if (filemtime($filename) === (int)$timestamp)
                return $contents;
        }

        $contents = file_get_contents($filename);
        $ts = filemtime($filename);

        // Populate all caches.
        $this->put($this->cachefilekey($filename), array('v' => $contents, 't'=> $ts), 0);
//        $this->put($this->cachefiletskey($filename), "{$filename};{$ts}", 0);

        return $contents;
    }
public function getFileContents($filename)
    {

        $cachecontents = $this->get($this->cachefilekey($filename));
//        $timestamp = $this->get($this->cachefiletskey($filename));

        if ($cachecontents !== false && is_array($cachecontents)) {

            $contents = array_key_exists('v', $cachecontents)?$cachecontents['v']:false;
            $timestamp = array_key_exists('t', $cachecontents)?$cachecontents['t']:false;

            if (filemtime($filename) === (int)$timestamp)
                return $contents;
        }

        $contents = file_get_contents($filename);
        $ts = filemtime($filename);

        // Populate all caches.
        $this->put($this->cachefilekey($filename), array('v' => $contents, 't'=> $ts), 0);
//        $this->put($this->cachefiletskey($filename), "{$filename};{$ts}", 0);

        return $contents;
    }
public function getFileContents ( $ filename ) { $ cachecontents = $ this -> get ( $ this -> cachefilekey ( $ filename ) ) ; //        $timestamp = $this->get($this->cachefiletskey($filename)); if ( $ cachecontents !== false && is_array ( $ cachecontents ) ) { $ contents = array_key_exists ( 'v' , $ cachecontents ) ? $ cachecontents [ 'v' ] : false ; $ timestamp = array_key_exists ( 't' , $ cachecontents ) ? $ cachecontents [ 't' ] : false ; if ( filemtime ( $ filename ) === ( int ) $ timestamp ) return $ contents ; } $ contents = file_get_contents ( $ filename ) ; $ ts = filemtime ( $ filename ) ; // Populate all caches. $ this -> put ( $ this -> cachefilekey ( $ filename ) , array ( 'v' => $ contents , 't' => $ ts ) , 0 ) ; //        $this->put($this->cachefiletskey($filename), "{$filename};{$ts}", 0); return $ contents ; }
return the file contents, but cache the results indefinitely, break cache
if timestamp changes

@param string $filename The filename to load

@return string the contents of the file specified.
return the file contents but cache the results indefinitely break cache if timestamp changes