MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​BuildingICaching­Service­BuilderWith­Key­Builder
Open sandboxFocus

ICachingServiceBuilder.WithKeyBuilder Method

WithKeyBuilder(Func<IFormatterRepository, CacheKeyBuilderOptions, ICacheKeyBuilder>)

Replaces the CacheKeyBuilder class with your own implementation.

Declaration
ICachingServiceBuilder WithKeyBuilder(Func<IFormatterRepository, CacheKeyBuilderOptions, ICacheKeyBuilder> factory)
Parameters
Type Name Description
Func<IFormatterRepository, CacheKeyBuilderOptions, ICacheKeyBuilder> factory

A delegate that creates an object implementing the ICacheKeyBuilder interface.

Returns
Type Description
ICachingServiceBuilder