private function _check_cache()
 {
     // cache is found and readable, check if we can still use it based
     // on its last modified timestamp
     $last_modified = @filemtime($this->cache_file);
     if ($last_modified + $this->cache_time <= $this->now && 'yes' == $this->options['enable_cache_auto_gen']) {
         // cached sitemap file has expired, and cache auto-regenerate
         // is enabled, remove the cached sitemap file and return to the main
         // handle to re-generate a new sitemap file.
         @unlink($this->cache_file);
         return false;
     }
     $lastmod = bwp_gxs_format_header_time($last_modified);
     $expires = bwp_gxs_format_header_time($last_modified + $this->cache_time);
     $etag = md5($expires . $this->cache_file);
     // build cached sitemap's headers for later use
     $this->cache_headers = array('lastmod' => $lastmod, 'expires' => $expires, 'etag' => $etag);
     if ($this->_check_http_cache($lastmod, $etag)) {
         return '304';
     }
     return '200';
 }
 private static function _format_header_time($time)
 {
     return bwp_gxs_format_header_time($time);
 }