Code Monkey home page Code Monkey logo

Comments (2)

matthiasmullie avatar matthiasmullie commented on May 27, 2024

Nice catch!
I fixed this, though slightly different than what you suggested: if new data is added to collections, it can also lead to evictions in the parent.
That is fair game, IMO: other cache backends will also evict whatever they deem necessary, regardless of whether it's in a parent or child (these collections are mostly artificial anyway, implemented via prefixing - they're not separate cache servers)
En plus: it's not about data persistence (especially not in a "memory store") - it's ok for data to fall out of cache (a cache eviction is just meant to prevent the app from blowing up if one attempts to store too much data)

from scrapbook.

bkdotcom avatar bkdotcom commented on May 27, 2024

Awesome!

MatthiasMullie\Scrapbook\Adapters\Collections\MemoryStore also needs to extend flush()

der... was thinking that flush should also update $size... but nothing is actually immediately "evicted"...
related to #30

from scrapbook.

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.