apache能缓存数据说明
What Can be Cached?
As mentioned already, the two styles of caching in Apache work differently,?mod_file_cache
?caching maintains file contents as they were when Apache was started. When a request is made for a file that is cached by this module, it is intercepted and the cached file is served.
mod_cache
?caching on the other hand is more complex. When serving a request, if it has not been cached previously, the caching module will determine if the content is cacheable. The conditions for determining cachability of a response are;
- Caching must be enabled for this URL. See the?
CacheEnable
?and?CacheDisable
?directives.
- The response must have a HTTP status code of 200, 203, 300, 301 or 410.
- The request must be a HTTP GET request.
- If the request contains an "Authorization:" header, the response will not be cached.
- If the response contains an "Authorization:" header, it must also contain an "s-maxage", "must-revalidate" or "public" option in the "Cache-Control:" header.
- If the URL included a query string (e.g. from a HTML form GET method) it will not be cached unless the response specifies an explicit expiration by including an "Expires:" header or the max-age or s-maxage directive of the "Cache-Control:" header, as per RFC2616 sections 13.9 and 13.2.1.
- If the response has a status of 200 (OK), the response must also include at least one of the "Etag", "Last-Modified" or the "Expires" headers, or the max-age or s-maxage directive of the "Cache-Control:" header, unless the?
CacheIgnoreNoLastMod
?directive has been used to require otherwise.
- If the response includes the "private" option in a "Cache-Control:" header, it will not be stored unless the?
CacheStorePri