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

gcache:add callback func before data expired when remove it #3971

Open
tianyixueshi opened this issue Nov 26, 2024 · 1 comment
Open

gcache:add callback func before data expired when remove it #3971

tianyixueshi opened this issue Nov 26, 2024 · 1 comment
Labels

Comments

@tianyixueshi
Copy link

Is your feature request related to a problem?

Option Yes

Describe the solution you'd like

I use gcache stroe a struct contains a chan for special web session used. when struct expired, i cannt close then chann before it removed.
so , can add a callback func when removed it

Describe alternatives you've considered

when set a cache, can add a optional call fun

Additional

No response

@yzy613
Copy link
Contributor

yzy613 commented Nov 30, 2024

This is not recommended because gcache is designed as an interface. If this interface is opened, can the same operation be applied to redis?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants