Git Product home page Git Product logo

Comments (6)

digitalbuddha avatar digitalbuddha commented on June 15, 2024

Yeah that's pretty crappy. I never found a good way to fix it. One solution is to delegate responsibility to a user's persister by calling clear. Alternatively a store can be stateful which is hard without storage. Open to suggestions 🤔

from store.

bobymicroby avatar bobymicroby commented on June 15, 2024

First thing that comes to mind

image

And on clear() we check if the resolver is the proper instance and if so, we delete the directory :)

P.S I know that this is pretty lame, and there are a lot of things to consider.
When I can find the time i will give it a proper thought and hopefully will come to a nice solution.
Cheers !

from store.

digitalbuddha avatar digitalbuddha commented on June 15, 2024

That looks reasonable. I'll think about it as well.

from store.

mradzinski avatar mradzinski commented on June 15, 2024

Any news regarding this? My use case is quite simple: Need to clean entries from disk when a user logs out. It certainly would be nice to be able to purge all entries without having to resort on "hacks", like setting a different type per user to force re-fetching when types don't match...

from store.

digitalbuddha avatar digitalbuddha commented on June 15, 2024

We are working on new version. It will have a better handle for this. Not sure release date

from store.

bobymicroby avatar bobymicroby commented on June 15, 2024

@mradzinski @digitalbuddha I've implemented POC that works based on my proposal above. Tried it in prod in my last app, living on the edge and stuff, and didn't find time to polish it to good PR. Shame.

from store.

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.