The result cache is enabled for the database instance.
Examine the following code for a PL/SQL function:
CREATE OR REPLACE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR
RESULT_CACHE RELIES_ON (HR.EMPLOYEES)
IS
date_hired DATE;
BEGIN
SELECT hire_date INTO date_hired
FROM HR.EMPLOYEES
WHERE EMPLOYEE_ID = emp_id;
RETURN TO_CHAR(date_hired);
END;
Which statement is true in this scenario?
A.
If sessions have different NLS_DATE_FORMAT settings, cached results have different formats.
B.
The function results are not cached because the query used in the function returns the DATE data type.
C.
If sessions have different NLS_DATE_FORMAT settings, cached results have same formats because the function’s return type is VARCHAR.
D.
If a function is executed with same argument value but different NLS_DATE_FORMAT for the session, the cached result is overwritten with the new function result.
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/subprograms.htm#g3336053
“The PL/SQL function result-caching feature does not automatically handle dependence on session-specific application contexts. If you must cache the results of a function that depends on session-specific application contexts, you must pass the application context to the function as a parameter. You can give the parameter a default value, so that not every user must specify it.”
A