Comments (3)
If you want to PR this somewhere in docs, go ahead. The use of nil
generally represents no value, so putting nil
into the cache is a weird pattern in the first place; the only case I can think of is checking presence, in which case using something like true
is probably better.
It's pretty much just a side effect from ETS itself, it's not something done in this lib. If an empty key comes back from ETS, it's nil
. There's no other way to communicate a cache miss other than nil
.
from cachex.
I'm going to close this out, because this is pretty much ETS behaviour. If someone places nil
in ETS, it's pretty much the same as nothing being there. There's a chance we can figure out a good way to work around it if more people need it, but I would suggest using something other than nil
!
from cachex.
Related Issues (20)
- Supervisor.spec deprecated and how to use multiple caches without using workers HOT 1
- Cachex Warmers Issue with 3.4.0 Elixir 1.12.3 and OTP 24.0.6 HOT 12
- Feature Request: Cache Warmer that doesn't block startup HOT 4
- Can the expire function return an :error ? HOT 4
- The `:ttl` option is not supported by the `fetch` function HOT 1
- Issue with specific cache key HOT 5
- Set TTL in fallback read-through cache HOT 5
- Only one call to fetch should return :commit
- Restructure around latest tooling and standards
- `Cachex.Spec.expiration` is underspecified in documentation
- What's the default expiration value when using Cachex.put? HOT 1
- Manually trigger cache warmers HOT 4
- Potential memory issues with LRW policy HOT 3
- Transactions not permitting parallel execution HOT 2
- Add a simple eviction policy to enforce limits with low memory overhead
- fetch and expire not setting TTL HOT 29
- Add a very basic LRU cache clear implementation HOT 3
- Does `Cachex.fetch` accept `ttl` option? HOT 4
- Supervisor.start_link/2 HOT 2
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 cachex.