public function set($key, $value, $expiration = 0)
    {
        $file = $this->cacheDir . $this->getDir($key) . $this->getFile($key);

        if (!file_exists(dirname($file))) {
            mkdir(dirname($file), 0755, true);
        }

        $return = file_put_contents($file, $value);
        touch($file, time() + $expiration);

        return $return;
    }
public function set($key, $value, $expiration = 0)
    {
        $file = $this->cacheDir . $this->getDir($key) . $this->getFile($key);

        if (!file_exists(dirname($file))) {
            mkdir(dirname($file), 0755, true);
        }

        $return = file_put_contents($file, $value);
        touch($file, time() + $expiration);

        return $return;
    }
public function set ( $ key , $ value , $ expiration = 0 ) { $ file = $ this -> cacheDir . $ this -> getDir ( $ key ) . $ this -> getFile ( $ key ) ; if ( ! file_exists ( dirname ( $ file ) ) ) { mkdir ( dirname ( $ file ) , 0755 , true ) ; } $ return = file_put_contents ( $ file , $ value ) ; touch ( $ file , time ( ) + $ expiration ) ; return $ return ; }
Stores a value in the cache

@param string $key
@param mixed $value
@param integer $expiration

@return boolean
Stores a value in the cache