...
Specifying value as null removes object from cache.
Example
How to store an object in cache
Code Block | ||
---|---|---|
| ||
var id = 1;
$Cache.Set("myObject:" + id, {
Name : 'Madonna'
}, "12:00:00"); |
Remarks
If duration is not specified, object is stored as indefinitely until cache is cleared.
Duration can be specified in "day.hh:mm:ss" format.
Specifying value as null removes object from cache.
ExampleExample
How to store an object in cache with duration
Code Block | ||
---|---|---|
| ||
var id = 1; $Cache.Set("myObject:" + id, { Name : 'Madonna' }, "12:00:00"); |
Examples
Code Block | ||
---|---|---|
| ||
var id = 1;
$Cache.Set("myObject:" + id, {
Name : 'Madonna'
}, "12:00:00"); |
...
language | js |
---|
...