Comments (3)
Thanks for reporting this and giving a repro! I suspect your fix is correct and I made a mistake here when I changed to use Interlocked/Volatile.Read a while back. I had thought the test you mentioned would detect this, will take a look at that as well - probably the test doesn't run with both partition schemes.
from bitfaster.caching.
I pushed a fix for this, but it's still not correct so I will rewrite the cycle logic. If we prevent cycling back to warm as you suggested, hit rate is reduced for some scenarios. The intent is that after some number of attempts, if we are over size the coldest item (last item in cold queue) is dropped to stay at capacity.
from bitfaster.caching.
Now fixed to correctly remove the coldest item after 5 attempts, constraining size within capacity.
from bitfaster.caching.
Related Issues (20)
- Serialise contents of LRU HOT 1
- [Feature request] - Enumerate all cached keys HOT 1
- Is it possible to add a method where it'll provide rough memory that is being used by the cache stance? HOT 2
- Is there a way to dump all values in the cache? HOT 1
- FastConcurrentTLru's Constructor timetolive is not precise on liunx mac platform HOT 7
- Any plans to evict expired items on the background? HOT 2
- Expiration based on a Value's property? HOT 2
- NuGet package is missing intellisense xml file HOT 1
- Use NonBlocking instead of ConcurrentDictionary HOT 1
- [Feature request] individual items expiry HOT 1
- Current time provider HOT 6
- [Feature request] Allow to pass additional factory argument to the `GetOrAdd`/`GetOrAddAsync` cache methods HOT 2
- Entry left in cache configured with WithAtomicGetOrAdd when value factory throws HOT 4
- [Feature request] Atomic TryRemove HOT 3
- [Feature request] Expire after access LRU HOT 5
- [Feature request] Add TryRemove(K, out V) overload HOT 1
- [Feature request] Add MRU cache HOT 3
- [Feature Request] Add TryRemove(KeyValuePair<K, V>) overload HOT 2
- Clearing LFU cache doesn't actually clear it HOT 9
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 bitfaster.caching.