Giter Site home page Giter Site logo

dash Cache has no `get_with` about moka HOT 2 CLOSED

moka-rs avatar moka-rs commented on June 12, 2024
dash Cache has no `get_with`

from moka.

Comments (2)

tatsuya6502 avatar tatsuya6502 commented on June 12, 2024

Hi. You are right; dash::Cache has no get_with (or get_or_insert_with).

A bit of history; we added the experimental dash::Cache for the following reasons:

  1. A user wanted to ensure never to get an issue: #34
    • The segmentation fault was occurring in our concurrent lock-free hash table implementation moka::cht.
    • moka::cht is used by sync and future caches.
  2. The same user wanted to reduce external crate dependencies. e.g. Remove crossbeam-epoch crate that is used by moka::cht.

We used dashmap::DashMap as an alternative concurrent hash table. However, implementing get_with method on it would require a non trivial amount of work, so we decided not to do it.

Now Moka v0.9.2 was just released with the fix for issue #34. So if you wanted to use dash::Cache just because to avoid the issue, you no longer have to use it. If so, please use sync::Cache or future::Cache instead.

from moka.

tatsuya6502 avatar tatsuya6502 commented on June 12, 2024

I am closing this. Feel free to reopen if you find sync::Cache or future::Cache do not meet your requirements.

from moka.

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.