-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
V15: Refresh caches on load balanced environments #17296
Conversation
…alanced # Conflicts: # src/Umbraco.Core/Cache/Refreshers/Implement/ContentCacheRefresher.cs
Hello @nikolajlauridsen just quick question , how will the subscribers know if there is content change ? only depend on the LocalCacheDuration ? if yes To be honest I don't think that is enough , I think we must have some sort of inter-communication pub/sub but since there is no coupling with any providers and some providers does not have pub/sub like sql. we need some default provider and i think about best bet here is web-hooks between publisher and subscribers |
Hi @IbrahimMNada the subscribers know about content changes through the |
Hello @nikolajlauridsen , please excuse my stupid questions here, as I'm only trying to learn/understand. from what I understand you are utilizing so if the I only trying to understand , Thanks <3 |
No stupid questions 😉 But no, the The Without going into too much detail it relies on the This can be configured with the |
I don't think it is correct approach, as currently you leak cache implementation into cache refresher, when cache refresher shouldn't be aware of cache implementation, only of exposed api of cache which allows to cache refresh. I guess logic to handle memory part should be built-in into AppCaches not into Cache refreshers, as than even if someone dont use memory cache it will be doing this bit of logic. |
…fresh-load-balanced # Conflicts: # src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs # src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs
This fixes #17263
Separates updating the memory cache and database cache into two separate methods.
This is because when load balancing only the publisher should update the database cache, however, all subscribers must update their memory cache.
The memory cache is updated when:
This also adds new named options for the documents and media, allowing you to configure the local memory cache duration, the remote cache duration and the seed cache duration for documents and media separately using named options under
Umbraco:CMS:Cache:Entry:
: