The image illustrates the validation caching technique for the second request. The details are as follows:
- mod_plsql detects that it has a cached content for the request.
- 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.
- 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:
These owa functions get the tag and caching level.
- The Web application sends the caching information to mod_plsql.
- Based on that information determines whether the content needs to be regenerated or can be served from the cache.
- 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.
- 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.