MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​Backends.​RedisRedis­Caching­Backend­ConfigurationRun­Garbage­Collector
Open sandboxFocus

RedisCachingBackendConfiguration.RunGarbageCollector Property


Gets or sets a value indicating whether the dependency garbage collector process should run while the caching back-end instance is alive. This property only makes sense when SupportsDependencies is set to true. The value of RunGarbageCollector is false by default. It is necessary to have at least one instance of the garbage collector active at any time. It is allowed but useless to have several concurrent instances of the garbage collector, but having a large number of them can hurt performance of the Redis server. The recommended approach to run the garbage collector is to deploy a separate application that only hosts this service. See CreateRedisCacheDependencyGarbageCollector(RedisCachingBackendConfiguration, IServiceProvider) for details.

public bool RunGarbageCollector { get; set; }
Property Value
Type Description