Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Specifying value as null removes object from cache.

Example

How to store an object in cache

Code Block
languagejs
var id = 1;
$Cache.Set("myObject:" + id, {
 Name : 'Madonna'
});

Example

How to store an object in cache with duration

Code Block
languagejs
var id = 1;
$Cache.Set("myObject:" + id, {
  Name : 'Madonna'
}, "12:00:00");

See Also