thepirat000 / CachingFramework.Redis

Distributed caching based on StackExchange.Redis and Redis. Includes support for tagging and is cluster-compatible.
Other
287 stars 52 forks source link

Get callback when item is removed from the cache? #39

Closed RahmanM closed 6 years ago

RahmanM commented 6 years ago

Hi there,

I can't see if there is a way to get callback when item is removed from the cache? This will be a very nice feature if can be done easily?

ta

thepirat000 commented 6 years ago

Sorry, my previous comment was wrong.

What you are looking for is the keyspace notification api: https://github.com/thepirat000/CachingFramework.Redis/blob/master/README.md#keyspace-notifications-api

RahmanM commented 6 years ago

Ah thanks,

That is what I was exactly looking for, not sure why I didn't see this section of documentation in the first place. I have already enabled notify-keyspace-events but possibly using it the wrong way. I give it another try and let you know.

TA

thepirat000 commented 6 years ago

you must enable keyspace notification in the redis server(s). Check https://redis.io/topics/notifications#configuration Get Outlook for Androidhttps://aka.ms/ghei36


From: RahmanM notifications@github.com Sent: Saturday, December 30, 2017 4:44:45 PM To: thepirat000/CachingFramework.Redis Cc: Federico Daniel Colombo; Comment Subject: Re: [thepirat000/CachingFramework.Redis] Get callback when item is removed from the cache? (#39)

Ah thanks,

That is what I was exactly looking for, not sure why I didn't see this section of documentation in the first place. I have already enabled notify-keyspace-events but possibly using it the wrong way. I give it another try and let you know.

TA

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/thepirat000/CachingFramework.Redis/issues/39#issuecomment-354572776, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJYXXLp0tBnNvkUzpZrT14UkYdaNAdIbks5tFrzdgaJpZM4RPkwl.

RahmanM commented 6 years ago

Thanks, this perfectly works.