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
summary: The decorated parameter will be used as cache key
30
30
example: []
31
31
syntax:
32
32
content: >-
@@ -111,7 +111,7 @@ items:
111
111
assemblies:
112
112
- Apizr
113
113
namespace: Apizr.Caching.Attributes
114
-
summary: The decorated parameter will be used as cache key (should be primitive otherwise ToString() method will be used, unless providing a property name)
114
+
summary: The decorated parameter will be used as cache key
Copy file name to clipboardExpand all lines: Apizr/Docs/Apizr.Docs/articles/config_datacaching.md
+59-3Lines changed: 59 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -254,7 +254,7 @@ Back to the example, we are saying:
254
254
255
255
#### CacheKey attribute
256
256
257
-
By default, Apizr will use all the method parameters (name and value) to generate a cache key (excepting property parameters, neither cancellation token parameters).
257
+
By default, Apizr will use all the method parameters (name and value) to generate a cache key (excepting property parameters, neither cancellation token).
258
258
But you may want to define your own cache key, choosing by yourself which parameter to include and which not.
259
259
That's what the `CacheKey` attribute is made for.
260
260
You can decorate one or more parameters with it, then it will be included in the cache key generation:
@@ -270,8 +270,64 @@ namespace Apizr.Sample
270
270
}
271
271
```
272
272
273
-
Cache key generation supports complex type parameters, so you can group your parameters into a single one to include them all.
274
-
If you don't want them all included, but few of it, you can either provide property names to include within the CacheKey attribute constructor, or get the full control by overriding its ToString() method.
273
+
Cache key generation supports complex type parameters, so you can group your parameters into a single one to include them all as cache key:
Copy file name to clipboardExpand all lines: Apizr/Docs/Apizr.Docs/changelog.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,19 @@
1
+
6.3.0
2
+
---
3
+
4
+
### All
5
+
6
+
-[New][Exceptions] Now we can **catch exceptions with a Func callback returning a Task of a handled boolean flag** thanks to `WithExCatching` fluent option
7
+
-[New][Exceptions] Now we can **catch exceptions by providing a custom exception handler implementing `IApizrExceptionHandler`** thanks to `WithExCatching` fluent option
8
+
-[New][ConfigureAwait] Now we can **adjust Http handlers task awaiting configuration** thanks to `ContinueOnCapturedContext` fluent option
9
+
-[New][CacheKey] Now we can **choose multiple complex type's properties to be included in cache key** computation
10
+
-[Fix][CacheKey] Now **providing a property name to the CacheKey attribute actually includes the property in cache key** computation as expected
-[New][Exceptions] Now we can **catch exceptions with a Func callback providing IServiceProvider and returning a Task of a handled boolean flag** thanks to `WithExCatching` fluent option
15
+
-[New][Exceptions] Now we can **catch exceptions by resolving a custom exception handler implementing `IApizrExceptionHandler`** thanks to `WithExCatching` fluent option
Copy file name to clipboardExpand all lines: CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,19 @@
1
+
6.3.0
2
+
---
3
+
4
+
### All
5
+
6
+
-[New][Exceptions] Now we can **catch exceptions with a Func callback returning a Task of a handled boolean flag** thanks to `WithExCatching` fluent option
7
+
-[New][Exceptions] Now we can **catch exceptions by providing a custom exception handler implementing `IApizrExceptionHandler`** thanks to `WithExCatching` fluent option
8
+
-[New][ConfigureAwait] Now we can **adjust Http handlers task awaiting configuration** thanks to `ContinueOnCapturedContext` fluent option
9
+
-[New][CacheKey] Now we can **choose multiple complex type's properties to be included in cache key** computation
10
+
-[Fix][CacheKey] Now **providing a property name to the CacheKey attribute actually includes the property in cache key** computation as expected
-[New][Exceptions] Now we can **catch exceptions with a Func callback providing IServiceProvider and returning a Task of a handled boolean flag** thanks to `WithExCatching` fluent option
15
+
-[New][Exceptions] Now we can **catch exceptions by resolving a custom exception handler implementing `IApizrExceptionHandler`** thanks to `WithExCatching` fluent option
0 commit comments