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

Cache Coherency Issue #30

Open
tvatavuk opened this issue Dec 18, 2019 · 0 comments
Open

Cache Coherency Issue #30

tvatavuk opened this issue Dec 18, 2019 · 0 comments

Comments

@tvatavuk
Copy link
Contributor

Updating DNN cache in one node do not update DNN cache on other DNN nodes. This issue looks like #6.

We are using DNN Redis Caching Provider v3.1.0 with DNN 9.3.2.

In custom DNN module we can workaround this issue with code like following.

// trash dnn cache in all other nodes
DataCache.RemoveCache(key);

 // set new value
DataCache.SetCache(key, value);

Possible solution is to update RedisCachingProvider code Insert method to broadcast message that will initiate removing of DNN caches in other nodes, after the RedisCache.StringSet(...

// Notify the channel
RedisCache.Publish(new RedisChannel(KeyPrefix + "Redis.Remove", RedisChannel.PatternMode.Auto), $"{InstanceUniqueId}_{key}");

Optionally configuration option can be added to enable/disable this new behavior if affects performance in unexpected way.

If this solution (or better one) is acceptable, I can prepare pull request?

Btw, thanks a lot for RedisCachingProvider. We are using it (with some customization) with out single issue in DNN farm with 14 nodes, for almost 4 years.

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

No branches or pull requests

1 participant