gregor.tusar
09/30/2024, 9:48 AMbuilder.Services.AddDistributedSqlServerCache(options =>
{
options.TableName = nameof(CacheStore);
options.ConnectionString = builder.Config.GetConnectionString("umbracoDbDSN");
});
How to make the application caches also shared between our kubernetes pods? Is this even intended to use or is Applicaiton Cache meant to be available only on one machine?
Should we refactor the Cache implementation to use service IDistributedCache
instead of AppCaches
?
Is there any example of that anywhere?
Thank youBlago Culjak
09/30/2024, 9:56 AMgregor.tusar
09/30/2024, 10:02 AMkdx-perbol
09/30/2024, 10:10 AMIDistributedCache
is an aspnetcore concept but Umbraco has a DistributedCache
class with helper methods. The Umbraco docs are a bit vague but from the looks of it you should use Isolated Caches in Umbraco and use the DistributedCache
helpers to manage the cache, so not use the aspnetcore cache stuff directly. For the shared-between-pods part it will simply depend on whether the pods use the same database.
I agree that using Redis or SQL as the actual distributed cache provider makes no difference to Umbraco.gregor.tusar
09/30/2024, 10:15 AMDistributedCache
implementation (Umbraco.Cms.Core.Cache
) I can only see refresh methods there. I know those are used to refresh the Isolated cache on the different servers, but this seem to only be some kind of notifications implementation, so that each server knows that it should remove its own instance of the cache. Doesn't help me with the actual distributed cache.Balázs Kerper
10/04/2024, 2:36 PM