Application Programming Interface Guide > Built-in Procedures > Procedures Reference > RefreshResourceCache
 
RefreshResourceCache
Refresh the cache for a table, procedure, or policy. Refreshes preexisting procedure cache variants, or only the NULL variant (when acceptable) if no others are present. This procedure launches an asynchronous process in the server which runs in its own transaction.
This built-in procedure is discussed in the “TDV Caching” section of the TDV User Guide.
Note: This procedure is different from the web services operation of the same name, which is in the resource tree under /services/webservices/system/admin/resource/operations/.
Location
/lib/resource/
Syntax
RefreshResourceCache "path" "type" [pollingInterval]
Inputs
path: The path to the resource, or the cache policy name.
type: The type of the resource (TABLE, PROCEDURE, or POLICY).
Outputs
N/A
Example
/lib/resource/RefreshResourceCache "/shared/examples/ds_orders/cache" "TABLE"
Exceptions
Exception: If any problems with connecting to or retrieving data from the data source when refreshing.
IllegalArgumentException: If the path is malformed or an illegal type is provided.
IllegalStateException: If the cache is disabled.
NotAllowedException: If the resource type does not support caching. Only SQL_TABLE resources support caching.
NotFoundException: If the resource or any portion of the path to the resource does not exist.
SecurityException: If the user does not have READ access on all items in the path other than the last one.
SecurityException: If the user does not have WRITE access to the last item in path.