Comments (7)
Or in other words, Is there something wrong with my conf ?
from bigcache.
Does it expire after 1 hour? If so then set LifeWindow: 0
and that will prevent eviction.
Line 9 in 0c76355
from bigcache.
oh thx, I will try it, i think u can supplement some annotation on LifeWindow
, like If set to <= 0 then no action is performed
from bigcache.
I double checked on this and it looks like in your case it wont work. 0 means everything will be imiedietally evicted so you need to use some bigger value.
from bigcache.
I double checked on this and it looks like in your case it wont work. 0 means everything will be imiedietally evicted so you need to use some bigger value.
wow, i update LifeWindow: 10 * 365 * 24 * time.Hour
and try it again.
Actually in my project i just want use bigCache
like Map now, Whether to add a property in bigcache.Config
like NeverLost
?
from bigcache.
It's complicated. In your configuration you have LifeWindow and HardMaxCacheSize. What bigcache should do if you need more memory than HardMaxCacheSize? Currently it will evict the oldest entry and replace it with new one. You can set HardMaxCacheSize
to 0 to allow it growing infinitely but I don't recommend that :)
Lines 25 to 32 in 982ec3b
from bigcache.
thx, u r right :)
from bigcache.
Related Issues (20)
- LifeWindow Not valid HOT 1
- Error logs about bytes allocation? HOT 1
- resetKeyFromEntry HOT 1
- Excessive memory allocation HOT 1
- The index(int) of entries(queue.BytesQueue) overflows the hashmap's uint32 value HOT 4
- Memory so high, and when clean not reduce size HOT 5
- Benchmark is not fair, So the speed can't be trusted HOT 4
- Whether it is a bug ? HOT 1
- Why doesn't bigcache consider designing expiration time for each cache key? HOT 4
- How does bigcache handle hash collisions HOT 1
- BigCache is logging allocations it should not HOT 4
- Support for the map? HOT 1
- compile a 32-bit LSB executable on arm and Execution error-> panic: unaligned 64-bit atomic operation HOT 6
- Is there a memory leak in bigcache? HOT 4
- Add multi-level cache design HOT 2
- Why do we need to configure both lifeWindow and cleanWindow? HOT 2
- GRPC server support HOT 4
- feature: Support uint64 keys without converting to string then back again HOT 6
- Proposal to Integrate SIEVE Eviction Algorithm
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 bigcache.