Comments (3)
Hi.
Thank you for your interest :)
- 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.
- 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.
Sodo_flush_all
as any other call will leave reserved memory intact.
I will be happy to answer any other questions
Cheers,
Iurii
from cachelot.
I basically understand through your kind answers, thank you very much (i will try some tests later).
from cachelot.
I was glad to help 👍
from cachelot.
Related Issues (20)
- Provide a callback to notify which items were evicted HOT 4
- Question: Atomic operations HOT 1
- Ubuntu daemon can't work HOT 2
- test_c_api problem HOT 2
- Build for Freebsd HOT 6
- Docker image Error: bind: Address in use
- Distribute as conan.io package
- Does not build out-of-tree HOT 7
- thread safe HOT 3
- Unit test failure in test_int_to_str HOT 4
- Install Missing in cmake List HOT 4
- Will it build/work with android ecosystem ? HOT 1
- is this cachelot library thread-safe? HOT 3
- why not remove the boost dependency HOT 1
- Add CI/CD on Windows
- Improve cachelot.io website performance HOT 1
- Coverity integration
- Add libFuzzer integration
- cachelot C api library and documentation HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cachelot.