PL/SQL Function Result Cache
You must create a PL/SQL function with a RESULT_CACHE
clause to add its result to the PL/SQL function result cache. When a cache-enabled PL/SQL function is invoked for the first time, the database looks into the PL/SQL result cache for its result with the matching arguments. If the result is found, it is returned to the calling environment without executing the function body. If the result is not found, the function body is executed and the result is stored in the PL/SQL function cache. Upon subsequent function calls for the same input parameters, the result is fetched directly from the cache.
Note that a result cache function doesn't need the dependent database tables to be result-cached.
Note
Oracle Database 11g Release 1 used the RELIES_ON
clause to specify the dependent data sources whose state would affect the status of the cached result. The clause was deprecated in Oracle Database 11g Release 2.
Does it sound similar to deterministic functions?
Developers who...