Cache Control
HTTP defines three basic mechanisms for controlling caches: freshness, validation, and invalidation.
- Freshness allows a response to be used without re-checking it on the origin server, and can be controlled by both the server and the client. For example, the Expires response header gives a date when the document becomes stale, and the Cache-Control: max-age directive tells the cache how many seconds the response is fresh for.
- Validation can be used to check whether a cached response is still good after it becomes stale. For example, if the response has a Last-Modified header, a cache can make a conditional request using the If-Modified-Since header to see if it has changed. The ETag (entity tag) mechanism also allows for both strong and weak validation.
- Invalidation is usually a side effect of another request that passes through the cache. For example, if a URL associated with a cached response subsequently gets a POST, PUT or DELETE request, the cached response will be invalidated.
Read more about this topic: Web Cache
Famous quotes containing the word control:
“We long for our father. We wear his clothes, and actually try to fill his shoes. . . . We hang on to him, begging him to teach us how to do whatever is masculine, to throw balls or be in the woods or go see where he works. . . . We want our fathers to protect us from coming too completely under the control of our mothers. . . . We want to be seen with Dad, hanging out with men and doing men things.”
—Frank Pittman (20th century)
Related Phrases
Related Words