OscarGodson/EpicEditor — Issue #31: Remove localStorage cache every N days/weeks/months
Author: OscarGodson
Created: 2012-02-25 02:36:59+00:00
State: open
Labels: Bug, Important

If we don't auto clear the cache in LS shit's gonna fill up at some point (since we don't know what else is being saved on the domain; could be images for example) and then the user is going to get hit with errors or will no longer have localStorage saving their work in progress posts.

This should be configurabe in options so that domains that fill up LS can either disabled LS with `clearCache:false` or set it to clear every N days/weeks/months like `clearCache:1000*60*60*24`. On the very first time loading this EE will save the current date in its LS stash and keep checking every reload after if it's been N time since the original set time.

Thinking something like this:

ee.options({
clearCache:1000*60*60*24
}).load()