Pingora memory cache types #589
RaoniSilvestre
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Just for context—I'm not an expert in Rust or memory caches, but I got curious about Pingora and was checking out its memory cache crate.
I noticed that the usual way to return data from the memory cache looks like this:
Here,
res
is anOption
, andhit
is an enum that describes the cache state.I was wondering—why return two separate values for this? Wouldn't something like this be simpler and more self-contained?
Just curious about the reasoning behind the design choice!
Beta Was this translation helpful? Give feedback.
All reactions