cache_tab caching errors
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- erlang
- Domain
- backend
Research direction
Start by reproducing the reported behavior through cache_tab:lookup/3, using the two callbacks shown in the issue. Inspect how the lookup handles an error result and verify that the subsequent successful lookup returns 1 instead of the cached error.
Written by the indexing model from the issue text.
Description
When I cache something which returns "error", the value is cached.
For example:
> cache_tab:new(cache_test, []).
> cache_tab:lookup(cache_test, key1, fun() -> error end).
> error
> cache_tab:lookup(cache_test, key1, fun() -> {ok, 1} end).
> error
I was expecting to get 1 as a value instead of error. It seems that cache_tab is caching the error as well. Maybe the documentation is wrong and I need to return something else.
Thanks!
PS: I'm using version 1.0.4 of cache_tab
- Dominant language
- Erlang
- Stars
- 47
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from processone/cache_tab
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
processone/cache_tab#18 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
processone/cache_tab#13 · 1 reaction ·
All issues in processone/cache_tab
Similar issues
-
bug customer-eng Durable Agents Inngest status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
integration: elevenlabs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
home-assistant/core#182944 · 1 comment ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·