Invalidating cache

Posted by / 02-Mar-2015 02:07

In addition to its greater flexibility in terms of response body content returned, response header invalidation requires less coding effort on the part of the Web applications since building an invalidation header is a fairly lightweight task.

For instance, when a customer purchases a vegetarian cookbook on an e-commerce site, the confirmation response could contain instructions for invalidating all catalog pages related to the book, its author and vegetables.

The ability to send invalidation message inline reduces the connection overhead associated with sending out-of-band invalidations and is a useful tool for ESI developers.

Oracle Web Cache supports the following forms of invalidation: and provides a useful way for origin servers to "piggyback" invalidation messages on HTTP responses sent to Oracle Web Cache.

Specifically, origin servers embed an XML invalidation document within the HTML of the response body using ESI tags.

This is a circumstance in which ESI inline invalidation does not work; Oracle Web Cache can only use ESI invalidation tags in conjunction with a response body that contains HTML.With response header invalidation, origin servers can send invalidation directives in a proprietary invalidation response header.As an alternative, Oracle Web Cache provides mechanisms for explicitly invalidating content when an administrator or application knows that such content has become stale.With invalidation, Oracle Web Cache marks objects as invalid.As described in Section 6.7, you create expiration policies and associate them with caching rules to refresh content from the origin server.

invalidating cache-21invalidating cache-25invalidating cache-15

Even with expiration policies, it is often difficult to predict when exactly content becomes stale.