-
Notifications
You must be signed in to change notification settings - Fork 3
[Core] Cache
Jesper Lindström edited this page Jun 8, 2014
·
2 revisions
To make sure your single page application is fast and responsive to the user, it's a good idea to cache data, especially if it's retrieved from a slow API server. Zeus provide basic caching through in-memory storage for visit-long storage capabilities.
Store data in the cache.
-
key (String): identifier for the cache object (preferably in
serviceName.dataNameformat) - value (Anything): the data to store
- expiration (Optional, integer): number of seconds to keep the data in cache. Defaults to forever.
Get data from the cache by identifier key.
- key (String): identifier for the cache object
- Return: Mixed
Check if a certain identifier key is in the cache. Expired objects are treated as nonexistent.
- key (String): identifier for the cache object
- Return: Boolean
Remove a certain cache object by identifier key.
- key (String): identifier for the cache object