GetDCache Method for the Application
The GetDCache method retrieves a value from the distributed cache (Coherence) for a specified key.
Format
TheApplication().GetDCache(Key);
The following table describes the argument for the GetDCache 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. |
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 string value mapped to the passed in Key.
Example
//put a value into the cache.
TheApplication().PutDCache("Key12345", "Value12345");
//retrieve that value by using the correct key.
var cachedValue:chars = TheApplication().GetDCache("Key12345");