Class CacheRouteDefinitionExtensions
DSL entry points and registration of the cache EIP.
public static class CacheRouteDefinitionExtensions
Inheritance
Methods
AddRedbRouteCache(IServiceCollection, Action<RouteCacheOptions>?)
DI registration: options plus the cache: component on the hosted context.
public static IServiceCollection AddRedbRouteCache(this IServiceCollection services, Action<RouteCacheOptions>? configure = null)
Cache(IRouteDefinition, Func<IExchange, string>, TimeSpan?)
Opens a caching scope with a key computed by key.
public static CacheDefinition Cache(this IRouteDefinition route, Func<IExchange, string> key, TimeSpan? ttl = null)
Cache(IRouteDefinition, string, TimeSpan?)
Opens a caching scope keyed by a route-language template ("customer-${header.customerId}").
public static CacheDefinition Cache(this IRouteDefinition route, string keyTemplate, TimeSpan? ttl = null)
UseCache(IRouteContext, Action<RouteCacheOptions>?)
Registers options and the cache: component on a context built without DI.
public static IRouteContext UseCache(this IRouteContext context, Action<RouteCacheOptions>? configure = null)