Synchronizing browser cache with angular-cache

27 views
Skip to first unread message

Mohan Radhakrishnan

unread,
Mar 5, 2015, 10:04:03 AM3/5/15
to angula...@googlegroups.com
Hi,

I read the difference between the browser's HTTP cache and $cacheFactory.
The solution is to use angular-cache.

Does this mean this cache synchronized itself with the browser's HTTP cache. So a cookied sent by a HTTP server
can be used to expire or invalidate the logged-in user's credentials in this cache.

When the server expires the session due to inactivity I want angular-cache to know about it.

// This cache will sync itself with localStorage
storageMode: 'localStorage',

Thanks,
Mohan

Mohan Radhakrishnan

unread,
Mar 6, 2015, 1:12:55 AM3/6/15
to angula...@googlegroups.com
This is what I mean. We want to store a state indicating that the user is logged in in angular-cache. Now everytime the cookie is received by the browser the state will be checked. Page refreshes shouldn't clear this cache. When the cookie expires due to inactivity the cache knows about it.

How can this be done ?

Thanks.
Reply all
Reply to author
Forward
0 new messages