PutDCache Method for the Application
The PutDCache method uses a unique key string to map to a value string in the distributed cache (Coherence).
Format
TheApplication().PutDCache(Key, Value);
The following table describes the argument for the PutDCache method.
Argument | Description |
---|---|
Key |
This is a string that uniquely identifies a key-value pair in the cache.
Note: Keys are case sensitive.
Note: There is a one-to-one mapping in the Coherence cache for key value pairs. A key will only point to a single string value. |
Value | This is a string that will map to the Key. In the end you will have a key-value pair in the Coherence cache. |
Usage
This method will only work when connected to the Coherence cache. Keys are case sensitive. Both the Key and the Value must be strings.
Used With
Server Script – eScript only
Returns
A boolean true if the key-value pair was successfully added or updated in the Coherence cache.
Examples
var l_success;
//put a value into the cache.
l_success = TheApplication().PutDCache("Key12345", "Value12345");
//retrieve that value by using the correct key.
var cachedValue:chars = TheApplication().GetDCache("Key12345");