We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b64242 commit d9d0246Copy full SHA for d9d0246
README.md
@@ -137,6 +137,24 @@ def func(arg):
137
138
```thread_safe``` is ```True``` by default. Setting it to ```False``` enhances performance.
139
140
+### Order-independent cache key
141
+
142
+By default, the following function calls will be treated differently and cached twice, which means the cache misses at the second call.
143
144
+```python
145
+func(a=1, b=1)
146
+func(b=1, a=1)
147
+```
148
149
+You can avoid this behavior by passing an `order_independent` argument to the decorator, although it will slow down the performance a little bit.
150
151
152
+@cached(order_independent=True)
153
+def func(**kwargs):
154
+ ...
155
156
157
158
### Knowing how well the cache is behaving
159
160
```python
0 commit comments