Coder Social home page Coder Social logo

Comments (3)

digitalbuddha avatar digitalbuddha commented on May 30, 2024

I don't think there is a good generic way for us to handle controlling max size for persisters. To unpack a bit more what is your expectation when max size is reached? Should we throw an exception? Should we overwrite oldest made file or oldest accessed? Should we allow priority for some files to not get deleted? What if someone's persister is appending data to a single file and they want to control max size of that file?

Personally, I'd recommend handling the logic yourself within the read/write function of your persister implementation

from store.

DanielAsher avatar DanielAsher commented on May 30, 2024

@digitalbuddha Thanks for your speedy response. I think I misunderstood the scope of this project. I expected to find a built-in implementation of a FileSystemPersister and a FileSystemPolicy that mirrored the MemoryPolicy.

To answer your questions:

Should we overwrite oldest made file or oldest accessed?

  • This should be specified by a FileSystemPolicy

Should we allow priority for some files to not get deleted?

  • This should be specified by a FileSystemPolicy

What if someone's persister is appending data to a single file and they want to control max size of that file?

  • This feels beyond the remit of a caching library.

Anyhow, thanks again for your explanation here.

from store.

DanielAsher avatar DanielAsher commented on May 30, 2024

I would suggest that the documentation could be more explicit. In particular the following text from the README:

You can also define how your Store will cache data in-memory and on-disk.

led me to think that file system caching policy was supported.

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.