public function set( $key, $value )
    {
        $cache_file = new File($key.self::CACHE_FILE_EXT, $this->config->getCacheRoot());
    
        $expire = $this->config->getExpire();
        $expires = $expire > 0 ? time() + $this->config->getExpire() : 0;
        $data = base64_encode(serialize($value));
        
        $content[] = 'expires:' . $expires;
        $content[] = 'type:' . gettype($value);
        $content[] = 'class:' . (is_object($value) ? get_class($value) : '');
        $content[] = 'data:' . $data;
    
        $cache_file->putContents(implode("\n",$content));
    }