public function get( $key )
    {
        $cache_file = new File($key.self::CACHE_FILE_EXT, $this->config->getCacheRoot());
    
        if (!$cache_file->exists()){
            return false;
        }
        if (!$cache_file->canRead()){
            throw( new CacheFileNotReadableException($cache_file) );
        }
        
        $lines = $cache_file->getContentsAsArray();
        
        static $keywords = [
            'expires', 'type', 'class', 'data'
        ];
        
        $cache_info =[];
        foreach($keywords as $keyword)
        {
            $line = array_shift($lines);
            $kwlen = strlen($keyword);
            
            if (!$line){
                throw( new CacheFileFormatException($cache_file) );
            }
            if (strlen($line) < $kwlen+1 || strpos($line,$keyword.':') !== 0){
                throw( new CacheFileFormatException($cache_file) );
            }
            $cache_info[$keyword] = substr($line,$kwlen+1);
        }
    
        // check expire date
        $expires = $cache_info['expires'] ? intval($cache_info['expires']) : null;
        if ($expires === null){
            throw( new CacheMetaDataException('expires',$expires) );
        }
        $now = time();
        if ($expires > 0 && $expires < $now){
            return null;
        }
        
        // decode data
        $data = $cache_info['data'] ?? null;
        if ($data === null){
            throw( new CacheMetaDataException('data',$data) );
        }
        $data = unserialize(base64_decode($data));
    
        // type check
        $type = $cache_info['type'] ?? null;
        if ($type === null){
            throw( new CacheMetaDataException('type',$type) );
        }
        if ($type !== gettype($data)){
            return null;
        }
    
        // class check
        if ($type === 'object'){
            $class = $cache_info['class'] ?? null;
            if ($class === null){
                throw( new CacheMetaDataException('class',$class) );
            }
            if (!($data instanceof $class)){
                return null;
            }
        }
    
        return $data;
    }