Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HybridCache: Enable setting expiration based on value in factory #56483

Open
1 task done
lindeberg opened this issue Jun 27, 2024 · 4 comments
Open
1 task done

HybridCache: Enable setting expiration based on value in factory #56483

lindeberg opened this issue Jun 27, 2024 · 4 comments
Assignees
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@lindeberg
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

My HybridCache factory is fetching data from an HTTP API. The fetch response includes a maxAge header, from which I want to set cache expiration.

There's no way of getting the value from the factory method to the expiration setting.

Describe the solution you'd like

Some way to enable this

Additional context

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Jun 27, 2024
@gfoidl gfoidl added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Jun 27, 2024
@Gutse
Copy link

Gutse commented Aug 6, 2024

we also need such feature. maybe change "HybridCacheEntryOptions? options" in method signature to "Func<T, HybridCacheEntryOptions?>" ?

@xnf
Copy link

xnf commented Nov 21, 2024

This should not be "hard" to do but brings a lot of value since one can set expiration depending on the factory response.

@wilsonneto-dev
Copy link

wilsonneto-dev commented Dec 8, 2024

Hi, folks.
I am just highlighting that it was also requested in the discussions/forum here: #57021

@mgravell
Copy link
Member

mgravell commented Dec 8, 2024

The demand is noted. We can try to look at what we can add here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

No branches or pull requests

6 participants