I’m using jquery’s jCache plugin http://plugins.jquery.com/project/jCache to cache some data that I calculate between refreshes, the problem is, after the page refreshes, the cached data seems to get lost.
alert($.jCache.hasItem(window.location.href)); //false
$.jCache.setItem(window.location.href,stringStore);
alert($.jCache.hasItem(window.location.href)); //returns true
After the page refreshes, the first hasItem is false again. What’s going on?
I never used this plugin, but as I looked inside the last release from 2007! I have to say that this plugin can not store data persistent. It’s somehow nothing else than a kind of stack with limited number of items to store data related to the current document.
You need to work with cookies or webstorage to keep data available after a refresh.