Git Product home page Git Product logo

Comments (3)

cdata avatar cdata commented on September 23, 2024

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.

ronnyroeller avatar ronnyroeller commented on September 23, 2024

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.

cdata avatar cdata commented on September 23, 2024

Thanks @ronnyroeller , looks cool!

from app-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.