Closed uberspeck closed 9 years ago
Hmm.. Not sure about that one. My concern is that I don't want the library to do too much, and become bloated with features that would rarely be useful.
Can you provide a scenario where you think this would be useful?
In my case I'm using local storage as a cache to reduce server requests. however I want the cached data to "expire" after a set time to prevent old data from hanging around. i can do this externally to angular-locker, but it would be awesome to just pass a TTL when setting data
* EDIT *
Just to give you an idea, here's the jStorage implementation - https://github.com/andris9/jStorage/blob/master/jstorage.js#L490
OK I see what you mean. I will have a think as to how I would implement it, and probably throw together a quick prototype and see where I get.
Thanks!
awesome! Thanks for looking into it!
decided not to add this for now.. might look at it again at some point
Are there any plans to add TTL features? jStorage, for example, has a TTL feature that's pretty useful. I'd make a pull request but, to be honest, not too confident in my ability to implement it cleanly