Aaron Sawyer
12/06/2023, 6:18 PMAaron Sawyer
12/06/2023, 6:31 PMAaron Sawyer
12/06/2023, 6:47 PMAaron Sawyer
12/06/2023, 11:18 PMD_Inventor
12/07/2023, 8:07 AMDistributedCache to send caching notifications across all your instances. It doesn't actually do the caching itself.
You can implement ICacheRefresher to have it clear your IAppPolicyCache. Then you use DistributedCache to fire a notification that makes all your instances execute their ICacheRefresher.
Does that make sense?Aaron Sawyer
12/07/2023, 2:43 PMD_Inventor
12/07/2023, 2:46 PMDistributedCache without the I?D_Inventor
12/07/2023, 2:46 PMAaron Sawyer
12/07/2023, 2:48 PMD_Inventor
12/07/2023, 2:49 PMAaron Sawyer
12/07/2023, 2:51 PMAaron Sawyer
12/07/2023, 3:16 PMD_Inventor
12/07/2023, 3:17 PMAaron Sawyer
12/07/2023, 3:17 PMD_Inventor
12/07/2023, 3:19 PMINotificationHandler interface, according to this page in the docs: https://docs.umbraco.com/umbraco-cms/reference/notifications/cacherefresher-notificationsAaron Sawyer
12/07/2023, 3:21 PMAaron Sawyer
12/07/2023, 3:23 PMD_Inventor
12/07/2023, 3:24 PMD_Inventor
12/07/2023, 3:25 PMAaron Sawyer
12/07/2023, 3:31 PMAaron Sawyer
12/07/2023, 4:28 PMpublic override void RefreshAll()
{
_logger.LogInformation("Refresh RunTime Cache in the machine name {machineName}", Environment.MachineName);
AppCaches.RuntimeCache.Clear();
base.RefreshAll();
}
I'm thinking I don't need to manually clear the cache when calling this:
_runtimeCache.ClearByKey(cacheKey); // <- unnecessary
_distributedCache.RefreshAll(MyRuntimeCacheLoadBalancerRefresher.UniqueId); //clear cache across all serversD_Inventor
12/07/2023, 5:26 PMAaron Sawyer
12/07/2023, 8:12 PMAaron Sawyer
12/07/2023, 8:14 PM