You can use an API to manage the remote policy cache. The MarinerServletApplication class provides methods for preloading the caches (or loading them), and flushing the caches.
You can use an API to manage the remote policy cache. The MarinerServletApplication class provides methods for preloading the caches (or loading them), and flushing the caches.
The API takes as input the URL to which the preload request is to be made. It causes a remote policy request to be sent to the URL with the Mariner-RequestType header set to 'policySet'. The response to this request from the remote policy server must be a set of policies contained within a rpdm:policies element. See Encoding remote policy responses for details of the response schema.
Where an entry is already present in the cache, it is replaced by the entry returned by the preload request. So you can use a preload request to refresh cache if you wish.
When entries are added to the cache during this kind of operation, all of the rules associated with cache size, cache control values, and quotas apply. However, retry does not apply to preload operations that fail.
A request to preload the caches can specify any amount of information from a single policy up to and including the entire contents of the remote policy server. Implementations of remote policy servers must be capable of handling requests with this breadth of scope.
MCS provides an API to allow part or all of any cache to be refreshed, including:
a specified cache, for example the image policy cache
all caches
a folder in a specified cache
an entry in a specified cache
a particular folder in all caches
The result of the flush operation is that all the entries specified are removed from the cache. The next time a reference is made to one of these policies, its value will be retrieved from the remote policy server in the usual way.