Application Programming Interface Guide > Web Services Operations > Operations Reference > updateResourceCacheConfig
 
updateResourceCacheConfig
Update the cache configuration for a resource.
Location
/services/webservices/system/admin/resource/operations/
Request Elements
The updateResourceCacheConfig request has five levels of elements. Elements at the fourth and fifth levels are preceded by their level number in square brackets ([4] and [5]).
path: The path of a cacheable resource.
type: The type of a cached resource can be TABLE or PROCEDURE.
detail: The level of detail about the resources to include in the response. Valid values are NONE, SIMPLE, and FULL.
cacheConfig: The cache configuration of the given resource.
allOrNothing (optional): This flag only applies to cache groups. TRUE if cache group refresh policy should be all or nothing; FALSE if cache group refresh policy should be best effort. For individual cache groups, this flag always returns TRUE and setting this flag has no effect.
configured (optional): TRUE if caching should be configured for the given resource; otherwise FALSE. If not provided, the configured setting is left unaltered. If configured is FALSE, all other elements are ignored.
enabled (optional): TRUE if the cache is enabled; otherwise FALSE. If not provided, the enabled setting is left unaltered.
incremental (optional): TRUE if the cache is incrementally maintained; otherwise FALSE. If not provided, the incrementally maintained setting is left unaltered.
storage (optional): How the cached is stored. If not provided, the storage settings is left unaltered.
useDefaultCacheStorage (optional): If TRUE, TDV uses the default cache data source to store cache tables. Only numBuckets and dropCreateIdx values are considered when this value is set to TRUE; the rest are ignored.
mode (optional): The type of storage used for the cache. It is required when useDefaultCacheStorage is not set, or is set to FALSE. May be AUTOMATIC, DATA_SOURCE or DATA_SOURCE_OTPS.
bucketMode (optional): Present when storage mode is DATA_SOURCE_OTPS, ignored otherwise. May be AUTO_GEN or MANUAL.
bucketProperties (optional): Present when bucketMode is AUTO_GEN, otherwise ignored.
[4] bucketCatalog (optional): Database catalog in which to create the bucket.
[4] bucketSchema (optional): Database schema in which to create the bucket.
[4] bucketPrefix (optional): Short string which begins the name of each bucket.
[4] numBuckets: Number of buckets to use for caching.
dropCreateIdx (optional): If TRUE, TDV automatically drops indexes before loading cache data, and creates them after loading.
storageDataSourcePath (optional): If the mode is DATA_SOURCE or DATA_SOURCE_OTPS, this identifies the path to the data source being used to store cache data.
storageTargets (optional): List of targets used for storing cache data. If the mode is DATA_SOURCE or DATA_SOURCE_OTPS, this is a list of the tables. If the mode is DATA_SOURCE_OTPS, storageTargets is required when bucketMode is MANUAL; otherwise, storageTargets is ignored.
[4] entry (optional):
[5]   targetName: For a TABLE resource and storage mode DATA_SOURCE this is always result, For a TABLE resource and storage mode DATA_SOURCE_OTPS this may be result, result1, result2, etc. For a PROCEDURE resource, this is the name of a cursor parameter, or an empty string for the scalar output parameters.
[5]   path: The path to the table used for storing this data.
[5]   type: Always TABLE.
refresh (optional): How the cache should be refreshed. If not provided, the refresh settings is left unaltered. See Refresh Element.
mode: How the cache should be refreshed. May be MANUAL or SCHEDULED.
schedule (optional): If the mode is SCHEDULED, this element has the following child elements:
[4] mode (optional): Always INTERVAL.
[4] startTime (optional): When the first refresh should occur.
[4] fromTomeInADay (optional):
[4] endTimeInADay (optional):
[4] recurringDay (optional):
[4] interval (optional): The number of seconds between refreshes.
[4] period (optional):
[4] count (optional):
[4] isCluster (optional):
expirationPeriod (optional): The amount of time, in milliseconds, after which the cache is cleared after it is refreshed. If less than zero, the period is set to zero (meaning the cache never expires). If not provided, the enable setting is left unchanged.
firstRefreshCallback (optional): A path to a procedure with zero input elements that should be invoked before the cache refresh.
secondRefreshCallback (optional): A path to a procedure with zero input elements that should be invoked after a successful or failed cache refresh.
clearRule (optional): NONE, ON_LOAD, or ON_FAILURE.
The normal behavior is that old cache data is cleared on expiration, or when a cache refresh successfully completes and the old cache data is replaced by the new cache data. If no clearRule is provided, the enable setting is left unaltered.
If NONE, just the normal behavior occurs.
If ON_LOAD, the normal behavior occurs, but the old cache data is immediately cleared as the refresh is started.
If ON_FAILURE, the normal behavior occurs, and the old cache data is cleared if the refresh fails.
Response Elements
cacheConfig (optional): The cache configuration of the given resource. This element is only present in the response if the detail level is not NONE. Response subelements are the same as request elements, but with updated values.
Faults
IllegalArgument: If the path is malformed or an illegal type is provided.
IllegalState: If the resource type does not support caching.
NotFound: If the resource or any portion of the path to the resource does not exist.
Security: The user must have READ access on all items in path.
Security: If the user does not have WRITE access on the last item in path.
Security: If the user does not have the ACCESS_TOOLS right.