Giter Site home page Giter Site logo

Comments (3)

aka-rider avatar aka-rider commented on June 10, 2024

Hi.

Thank you for your interest :)

  1. By design, Cachelot is single threaded. There's no synchronization mechanism in place because access patterns may differ drastically.
    Concurrent read is not allowed, as there might be cache maintenance activity coupled with read operations (for instance, hash table growth and rehashing is done partially with read and write operations to avoid latency spikes). Cachelot is single threaded, so all "background" activity is coupled together with user requests.

I see some doc says: returned pointer guaranteed to be valid only until the next Cachelot call, does this limitation exit on concurrent read ?
This limitation still exists. Item will not be evicted during the read, but some sort of compression or compaction may implemented that will make pointer invalid.

  1. Cachelot doesn't allocate nor frees memory during the operations. It uses pre-allocated arena and keeps all items inside of it. Hence the limitation "returned pointer guaranteed to be valid only until the next Cachelot call" — Cachelot returns pointer from its internal arena to avoid copying, but that memory can be re-used by other items.
    So do_flush_all as any other call will leave reserved memory intact.

I will be happy to answer any other questions

Cheers,
Iurii

from cachelot.

xvyvx avatar xvyvx commented on June 10, 2024

I basically understand through your kind answers, thank you very much (i will try some tests later).

from cachelot.

aka-rider avatar aka-rider commented on June 10, 2024

I was glad to help 👍

from cachelot.

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.