You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fosco Marotto edited this page Jan 28, 2016
·
1 revision
cache.js
Simple caching for the app and user sessions
// during a request
var user = cache.getUser(sessionToken);
if (!user) { ... }
// during login/signup
cache.setUser(sessionToken, userObject);
// during logout
cache.clearUser(sessionToken);
Also has an unused statistics object which could be used to implement in-memory analytics storage.