You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Support IServiceProvider in builder pattern
* Re-ordered parameters to match AddHttpClient format
* Adds core support for named cache stacks
* Hide previous implementations of builder pattern
These won't be deprecated yet because they are so new but will be hidden by editors that observe the `EditorBrowsable` attribute.
* Updated documentation
* Use ServiceCollection implementation
* Added initial tests for named cache stacks
* Bringing ICacheContextActivator into the builder
* Remove new ICacheContextActivator variations
With the idea to move them to the builder pattern, there is no point adding new overloads that are already hidden.
* Updated documentation
* Use single NamedCacheStackLookup
This technically allows a named `ICacheStack<TContext>` to be resolved from an `ICacheStackAccessor` as well as an `ICacheStackAccessor<TContext>`. For an `ICacheStack`, that will throw an exception if tried to be resolved from an `ICacheStackAccessor<TContext>`.
* Fixed up test errors
@@ -366,7 +366,31 @@ You can use this context to hold any of the other objects or properties you need
366
366
367
367
|ℹ Need a custom context resolving solution? |
368
368
|:-|
369
-
|You can specify your own context activator via `AddCacheStack` by implementing a custom `ICacheContextActivator`. To see a complete example, see [this integration for SimpleInjector](https://github.com/mgoodfellow/CacheTower.ContextActivators.SimpleInjector)|
369
+
|You can specify your own context activator via `builder.CacheContextActivator` by implementing a custom `ICacheContextActivator`. To see a complete example, see [this integration for SimpleInjector](https://github.com/mgoodfellow/CacheTower.ContextActivators.SimpleInjector)|
370
+
371
+
## <aid="named-cache-stacks"> 🏷 Named Cache Stacks
372
+
373
+
You might not always want a single large `CacheStack` shared between all your code - perhaps you want an in-memory cache with a Redis layer for one section and a file cache for another.
374
+
Cache Tower supports named `CacheStack` implementations via `ICacheStackAccessor`/`ICacheStackAccessor<MyContext>`.
375
+
376
+
This follows a similar pattern to how `IHttpClientFactory` works, allowing you to fetch the specific `CacheStack` implementation you want within your own class.
0 commit comments