Closed MatthewDolan closed 3 years ago
I think a context version is needed. It is hard to debug errors in the underlying loader without the context from the operation that caused the load.
Reloading value can be done asynchronously, so I'm not sure how context is used/created in that case.
Any update on this? I'd love to pass the context through (where possible) since my underlying datastore is context-aware (e.g., handles context cancellation etc well)
The current definition of
LoadingCache
isI have been running into problems debugging errors on the
Get
method because I can't associate a givenGet
call with a specific call ofLoaderFunc
. The context chain is broken.I would propose adding a new parameter to
Get
andLoaderFunc
the would propagate the context and make debugging easier.What do you think?