Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

cache_tab caching errors

Aperta
#4 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
erlang
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

documentation

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

Lingua principale
Erlang
Stelle
47
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di processone/cache_tab

Tutte le issue di processone/cache_tab

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.