The image illustrates the validation caching technique for the second request. The details are as follows:

  1. mod_plsql detects that it has a cached content for the request.
  2. mod_plsql forwards the same tag and caching level information (from the first request) to the PL/SQL procedure as part of the CGI environment variables.
  3. The PL/SQL procedure uses these caching CGI environment variables to check if the content has changed. It does so by calling the following owa_cache functions from the PL/SQL Web Toolkit:

    owa_cache.get_etag;
    owa_cache.get_level;

    These owa functions get the tag and caching level.

  4. The Web application sends the caching information to mod_plsql.
  5. Based on that information determines whether the content needs to be regenerated or can be served from the cache.
    1. If the content is still the same, the procedure calls the owa_cache.set_not_modified procedure and generates no content. This causes mod_plsql to use its cached content. The cached content is directly streamed back to the browser.
    2. If the content has changed, it generates the new content along with a new tag and caching level. mod_plsql replaces its stale cached copy with a new one and updates the tag and caching level information. The newly generated content is streamed back to the browser.