Comments (5)
That is what the lib did previously, but it leads to sharing the object between multiple goroutines which causes nasty bugs if object is modified. You probably need to create a specialized cache just for your use case.
from cache.
Since the object is never modified, it possible to add a option to accomplish this?
from cache.
It should be possible. Do you care to send a PR?
from cache.
I am working on tests. Once it's done I will send a PR :)
from cache.
I prefer not to fix this. If you need better performance - use sync.Map or write something that works for your use case.
from cache.
Related Issues (20)
- LRU cache
- newbie: trying to understand utility of this package compared to `redis/go-redis/v9`
- Crashed if tiny lfu size is 1 or 2
- Using TinyLFU doesn't work as you would expect a cache to HOT 1
- How to use cache like map[string]any?
- Why do I think the higher the version, the more difficult it is to use? HOT 1
- Feature request: Support TTL command HOT 4
- TTL in TinyLFU vs TTL in cache.Item HOT 1
- How to save the array HOT 1
- Nil comparaison used for Item.Value field is not accurate HOT 1
- Add batch delete feature HOT 1
- unknown compression method: 3d HOT 6
- Add instructions to use context.WithCancel() to documentation HOT 1
- Is it safe to use it with concurrency? HOT 4
- Is there any way to flushdb with go redis cache? HOT 2
- Dates are unmarshaled to time.Local HOT 1
- How to set item with no expiration? HOT 4
- Cache with mock doesn't work HOT 1
- go-redis V9 compatibility HOT 2
- add support redis/rueidis
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 cache.