hgzimmerman / rocket-file-cache

An in-memory file cache for the Rocket web framework
MIT License
22 stars 6 forks source link

Create a cache-pool example #2

Closed hgzimmerman closed 6 years ago

hgzimmerman commented 6 years ago

Mitigate Mutex lock contention by creating multiple caches that are pooled together. If the number of threads is equal to the number of caches in the pool, then there should not be any latency waiting for locks.

That said, there would be an increase in memory consumption equal to the size of one cache times the number of caches in the pool.

hgzimmerman commented 6 years ago

Implemented.