Code Monkey home page Code Monkey logo

Comments (4)

cabol avatar cabol commented on August 16, 2024 1

Right, currently the only adapter that offers data persistence is the Redis adapter, because of Redis itself, you know Redis provides support for persistence already, so I'd say more than the adapter is Redis, you can configure it for data persistence.

from nebulex.

cabol avatar cabol commented on August 16, 2024

This is a good/interesting question. The dump/load commands are mainly meant for running on-demand and be invoked from your application. For example, you may have a job/process/gen_server in your app that runs from time to time (or when there is a graceful shutdown you could dump the data before stopping the app) and calls the dump command to take a snapshot of the cache, and another job/process/gen_server that runs when the app starts and tries to restore the cache from a file by calling the load command. Certainly, this is a very naive approach that won't avoid losing data but at least will avoid losing everything. However, there may be situations you don't want to lose any data, in that case, the adapter should provide also persistence, like Redis for instance, you can configure it for persisting data, but this is on the adapter side. Let me know if that helps, I stay tuned, thanks!

from nebulex.

benonymus avatar benonymus commented on August 16, 2024

Hey,

Thanks for the response.
In this case the main goal is to achieve a sort of pass-over between deployments just to cover edge cases.
I did what you mentioned too, added a process that starts after the cache and upon shutdown it dumps the cache to a file and on startup it loads it. Seems to achieve what I was looking for here.

Thanks!

from nebulex.

benonymus avatar benonymus commented on August 16, 2024

How would I achieve data persistence? Which adapter offers that? Or you meant that for Redis only?

from nebulex.

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.