cache-manager icon indicating copy to clipboard operation
cache-manager copied to clipboard

Namespacing `CacheableSync` events to isolate cache synchronization across services

Open lyhongnhat opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. Suppose I have two services, both configured with Cacheable and using CacheableSync along with RedisMessageProvider as the messaging backbone. These two services share the same Redis instance.

The problem is that cache synchronization for one service can unintentionally affect the other, causing it to store cache items that it does not need.

Describe the solution you'd like May edit the publish method in CacheableSync to namespace the events like my-namespace::cache:set

lyhongnhat avatar Nov 21 '25 07:11 lyhongnhat

@lyhongnhat - thanks. I see where you’re going on this and I will look to see how hard it is to implement.

jaredwray avatar Nov 21 '25 16:11 jaredwray

https://github.com/jaredwray/cacheable/pull/1473

jaredwray avatar Nov 21 '25 16:11 jaredwray

@lyhongnhat - this should be live in the next week or so.

jaredwray avatar Nov 21 '25 21:11 jaredwray