Comments (3)
LocalStorage doesn't keep any built-in indication of create / update time. It's possible to keep track of this yourself by recording such values with your data as you change it, but it can be costly to constantly deserialize and re-examine values that are kept in LocalStorage.
app-localstorage-document
does nothing to improve this condition, nor does it make anything harder than it would be when using the basic Storage API.
app-indexeddb-mirror
uses IndexedDB as its backing storage layer. This presents an opportunity to index and query by age of record in order to purge old entries. Currently, app-indexeddb-mirror
does not do this. However, if someone could describe the user story in an issue, we may be able to design a feature of app-indexeddb-mirror
that supports automatic purging of old data.
So, bottom line: app-storage doesn't do anything to help or hurt this specific use case today. In some cases, it might be able to help in the future. For LocalStorage: I would advise against trying to keep lots of structured data there.
from app-storage.
In case somebody else faces the same issue, we implemented and open sourced an element that allows pruning old entries in local storage:
https://github.com/Collaborne/iron-localstorage-behavior
Here the description: https://medium.com/collaborne-engineering/how-to-avoid-local-storage-from-overrunning-4c9702681290#.lwjkb9s9p
from app-storage.
Thanks @ronnyroeller , looks cool!
from app-storage.
Related Issues (20)
- Polymer 2.0 requires a class instead of Polymer({...})
- Cannot read property 'baseURI' of undefined HOT 3
- app-indexeddb-mirror and already persisted store
- IE/Edge can't sync local-storage data HOT 1
- Firebase Example Doesn't Work HOT 1
- `someUniqueSessionKey` in README/docs, but not in example
- How to use zeroValue function to initialize the default value? HOT 1
- this.set('path',value) doesn't reflect changes in the local storage.
- <app-localstorage-document> always initialize with the default value despite the value has been stored HOT 1
- I want to get data what i added in persisted-data on browser refresh HOT 3
- In setStoredValue: function(path, value) value is not used
- IE11 does not work
- [Feature Request] - App-indexeddb-mirror Load if offline OR data is empty
- how to use app-indexeddb-mirror with firebase. docs issue HOT 1
- Polymer.AppNetworkStatusBehavior name wrong in documentation
- Multiple <app-indexeddb-mirror> not working when offline
- app-indexeddb-mirror not working consistently HOT 16
- exception HOT 1
- app-indexeddb-mirror cause app not responding HOT 2
- app-local-storage-document uses window.top, crashing iframes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-storage.