Search Results get_etag




Overview

The SYS.OWA_CACHE package body is a private Oracle Web Agent (OWA) infrastructure component that implements HTTP response caching for the Oracle E-Business Suite web tier. It provides the low-level buffering and header-management logic used by the PL/SQL Toolkit (htp/owa) to emit cache directives, entity tags (ETags), expiration headers, and surrogate-control headers directly into the HTTP response buffer. In the EBS 12.1.1 and 12.2.2 technology stacks, this package is a foundational piece of the Apache/mod_plsql integration layer that mediates communication between the database and the Oracle HTTP Server.

The package relies on a fixed in-memory header buffer (htp.htbuf_arr) with reserved line indexes for the status header, ETag header, expires header, cache level header, surrogate-control header, and end line. Constants such as ignore_header, read_header, and write_header define the X-ORACLE-IGNORE and X-ORACLE-CACHE directives, while stored_etag and stored_level serve as sentinel values. The package accommodates buffer constraints imposed by Bug 6336258, capping surrogate-control values at 236 bytes and cache values at 55 bytes so that each array element remains 256 bytes.

Key Procedures and Functions

The documented API set consists of eight procedures and functions:

  • INIT — Reserves the fixed header slots (status, ETag, expires, level, surrogate-control, end line) in the caller-supplied buffer and row counter. It must be invoked before any body data is written to the buffer.
  • DISABLE — Suppresses the emission of cache-related headers for the current response, effectively turning off caching behaviour for that request.
  • SET_EXPIRES — Sets the expiration header (X-ORACLE-EXPIRES) so downstream caches and browsers know when the response becomes stale.
  • SET_CACHE — Populates the cache level header (Cache-Control) governing whether the response may be cached and under what rules.
  • SET_NOT_MODIFIED — Emits the not-modified response state, allowing a conditional GET to short-circuit and return a 304-style result.
  • SET_SURROGATE_CONTROL — Writes the Surrogate-Control header, used by reverse-proxy caches sitting in front of the application tier.
  • GET_LEVEL — Returns the currently configured cache level.
  • GET_ETAG — Returns the currently stored entity tag used for conditional requests.

Parameter lists are intentionally omitted because the package is undocumented in the ETRM repository beyond name and purpose.

Tables Accessed

No application tables are referenced. All state is held in PL/SQL package globals (v_nstatusidx, v_netagidx, v_nexpiresidx, v_nlevelidx, v_nsurridx, v_nendlineidx, stored_etag, stored_level) and in the in-memory HTTP buffer passed by reference. There is no persistent storage, so cache state does not survive beyond the current database session or HTTP request.

Usage Notes

OWA_CACHE is not intended for direct invocation by EBS developers. It is called internally by the PL/SQL Toolkit when generating HTTP responses from the mod_plsql or Oracle HTTP Server gateway. It is referenced by one other package, confirming its role as a supporting dependency rather than a public API. Custom code that needs cache control should use higher-level htp or owa interfaces; direct use of SYS.OWA_CACHE is unsupported and may change without notice between EBS releases. The reference to value_error in user searches is consistent with runtime exceptions raised when buffer slot indexes or header lengths exceed the constrained sizes defined in this package.