A fine-grained access control mechanism uses policy functions that are
associated with a database object (e.g. table and view). The policy
functions are invoked, when, for example, a database server detects that
a query is issued against the database object. The value of a policy
function remains constant under certain conditions. For example, once a
database server is brought up, the value of a policy function may remain
the same. Users can specify the conditions under which the value of a
policy function remain constant. Based on this information, when a policy
function is computed while processing a query, the database server caches
the value of the policy function. When processing another query that
requires the value of the policy function, the database server retrieves
the result from the cache rather than re-computing the policy function,
as long as the condition under which the policy function remains constant
persists.