From the list, select Cookie or Header.

7-26 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache Oracle Web Cache ships with the following Application Program Interfaces APIs that you can implement: ■ jawc.jar for a Java invalidation API ■ wxvutil.sql and wxvappl.sql for a PLSQL invalidation API These APIs are located in the following directories: UNIX ORACLE_HOMEwebcachetoolkit Windows ORACLE_HOME\webcachetoolkit For more information about these APIs, see readme.toolkit.html in the following directories for further information about the APIs: UNIX ORACLE_HOMEwebcachedocs Windows ORACLE_HOME\webcachedocs

7.7.4 Using Database Triggers for Automated Invalidation Requests

Database triggers are procedures that are stored in the database and activated fired when specific conditions occur, such as adding a row to a table. You can use triggers to send invalidation requests. Use the UTL_TCP Oracle supplied package to send invalidation requests through database triggers. For more information, see Oracle PLSQL documentation.

7.7.5 Using Scripts for Automated Invalidations

Many Web sites use scripts for uploading new content to databases and file systems. A large online book retailer, for instance, might run a PERL script once a day to bulk load new book listings and price changes into its catalog database. The retailer would want the price changes and availability listings to be reflected in the item views and search results currently cached in Oracle Web Cache. To achieve this result, you can modify the PERL script such that when the bulk loading operation has completed, the script sends an invalidation request to the cache invalidating all catalog views and search results. Note that the invalidation request need not list every individual search page or item view that might be effected by the data change. The performance assurance feature of Oracle Web Cache enables administrators to use broad brush strokes when invalidating content, making it safe to invalidate all catalog content even if only a fraction of that content has changed.

7.8 Enabling Response-Header Invalidation

Response header invalidation is an Oracle Web Cache feature that enables an origin server to invalidate cached content through an HTTP response header. The response-header field supports the following syntax: Oracle-WebCache-Invalidate: [SYNCHRONOUS=ON|OFF,] URI=value | URI_DIR=value [;S_KEY=value] | S_KEY=value [;S_KEY=value] [,SYNCHRONOUS=ON|OFF,] URI=value | URI_DIR=value [;S_KEY=value] | S_KEY=value [;S_KEY=value] [,SYNCHRONOUS=ON|OFF] Table 7–5 describes the control directives for response header invalidation. Invalidating Content 7-27 Usage Notes ■ An invalidation response header consists of the header name Oracle-WebCache-Invalidate followed by a colon :, followed by one or more invalidation directives with consecutive pairs of invalidation directives Table 7–5 Control Directives for Oracle-WebCache-Invalidate Control Directive Description SYNCHRONOUS The SYNCHRONOUS directive enables Oracle Web Cache to determine whether to complete the invalidation before returning the response to the client. It applies to the invalidation as a whole—the combination of all invalidation response headers for a given response. By default, Oracle Web Cache waits for the invalidation to complete SYNCHRONOUS=ON before returning the response. Typically the original request updates content hosted by the origin server, and the origin server, in turn, ensures that Oracle Web Cache invalidates all its entries associated with the content before the client receives a response. There is a direct link between the original request and the content identified in the invalidation response header. If an origin server appends an invalidation response header to a random request, the client sending the request should not have to wait for the invalidation to complete. In this case, the origin server should direct Oracle Web Cache to return the response before proceeding with the invalidation SYNCHRONOUS=OFF. URI An invalidation specification with the URI option directive enables Oracle Web Cache to invalidate the entry with the specified URI; this corresponds to basic invalidation. URI_DIR An invalidation specification with the URI_DIR option directive enables Oracle Web Cache to interpret the specified URI as a directory and to invalidate all entries stored in the specified directory; this corresponds to URI prefix invalidation, a small but often used subset of advanced invalidation. Note that the directory URI strings must end in a slash to make the URI_DIR option directive consistent with current URI prefix invalidation. S_KEY An invalidation specification with the S_KEY option directive enables Oracle Web Cache to interpret the quoted string as a search key; this corresponds to search key invalidation, another small subset of advanced invalidation. Search key matching is case sensitive, the same as it is for traditional invalidation. When a S_KEY option directive appears without an explicit URI directory, Oracle Web Cache uses an implicit URI directory equivalent to the root of the site definition associated with the incoming request. In particular, if the site definition contains a path prefix, the implicit URI directory includes this path prefix. Conjoined Multiple Directives An invalidation response header may contain a URI directory followed by one or more search keys. In this situation, a semicolon ; delimiter separates each directive. When this occurs, a Oracle Web Cache entry must match all the directives to qualify for invalidation. Multiple Invalidation Directives When an invalidation response header contains multiple invalidation directives with each consecutive pair of invalidation directives separated by a comma, an Oracle Web Cache entry must match at least one invalidation directive to qualify for invalidation. In other words, Oracle Web Cache treats each comma-delimited invalidation directive as an independent invalidation operation. Mixing Commas and Semicolons When an invalidation response header contains both kinds of separators, commas and semicolons, semicolons take precedence. In other words, the consecutive directives separated by semicolons must be examined; then consecutive directives separated by commas are examined. Multiple Invalidation Response Headers An origin server can store multiple invalidation response headers in its response to Oracle Web Cache. When this happens, an Oracle Web Cache entry only needs to match one header to qualify for invalidation. In other words, the content of multiple invalidation response headers in the same response are treated as if they were part of a single response header joined by commas. If a response contains at least one invalid invalidation response header, no invalidation takes place even if the response contains other valid invalidation response headers.