xtr-cache 4.0.4__tar.gz → 5.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/PKG-INFO +21 -22
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/README.md +16 -10
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/pyproject.toml +9 -15
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/pyproject.toml.orig +9 -19
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/.agents/skills/xtr-cache/SKILL.md +7 -3
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/__init__.py +1 -1
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/LICENSE +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/.agents/skills/xtr-cache/references/adapters.md +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/.agents/skills/xtr-cache/references/stampede-and-marshallers.md +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/__init__.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/_digest.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/_internal_key.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/__init__.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/abstract_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/adapter_factory.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/adapter_interface.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/array_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/chain_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/contracts_mixin.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/deferred_items_mixin.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/filesystem_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/null_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/redis_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/tag_aware_adapter.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/tag_aware_adapter_interface.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/adapter/tagged_value.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/bundle/__init__.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/bundle/cache_bundle.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/bundle/cache_config.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/bundle/pool_config.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/cache_item.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/cache_pool_clearer.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/cache_pool_clear_command.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/cache_pool_delete_command.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/cache_pool_invalidate_tags_command.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/cache_pool_list_command.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/cache_pool_prune_command.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/pool_command.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/pools.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/exception/__init__.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/exception/logic_error.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/exception/marshalling_error.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/lock_registry.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/marshaller/__init__.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/marshaller/default_marshaller.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/marshaller/deflate_marshaller.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/marshaller/marshaller_interface.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/marshaller/sodium_marshaller.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/pruneable_interface.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/py.typed +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/recipe/__init__.py +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/recipe/manifest.toml +0 -0
- {xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/value_wrapper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xtr-cache
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: Cache pools in memory, in files, in Redis, chained or tag-aware, with stampede protection.
|
|
5
5
|
Keywords: cache,redis,stampede,tags,asyncio
|
|
6
6
|
Author: Xterr
|
|
@@ -16,20 +16,13 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.14
|
|
17
17
|
Classifier: Typing :: Typed
|
|
18
18
|
Requires-Dist: typing-extensions>=4.4
|
|
19
|
-
Requires-Dist: xtr-cache-contracts>=
|
|
20
|
-
Requires-Dist: xtr-clock>=
|
|
21
|
-
Requires-Dist: xtr-lock>=
|
|
22
|
-
Requires-Dist: xtr-logging-contracts>=
|
|
23
|
-
Requires-Dist: xtr-console>=4.0,<5 ; extra == 'console'
|
|
24
|
-
Requires-Dist: xtr-dependency-injection>=4.0,<5 ; extra == 'di'
|
|
25
|
-
Requires-Dist: xtr-service-contracts>=4.0,<5 ; extra == 'di'
|
|
26
|
-
Requires-Dist: xtr-logging>=4.0,<5 ; extra == 'logging'
|
|
19
|
+
Requires-Dist: xtr-cache-contracts>=5.0,<6
|
|
20
|
+
Requires-Dist: xtr-clock>=5.0,<6
|
|
21
|
+
Requires-Dist: xtr-lock>=5.0,<6
|
|
22
|
+
Requires-Dist: xtr-logging-contracts>=5.0,<6
|
|
27
23
|
Requires-Dist: redis>=5.0 ; extra == 'redis'
|
|
28
24
|
Requires-Dist: pynacl>=1.5 ; extra == 'sodium'
|
|
29
25
|
Requires-Python: >=3.11
|
|
30
|
-
Provides-Extra: console
|
|
31
|
-
Provides-Extra: di
|
|
32
|
-
Provides-Extra: logging
|
|
33
26
|
Provides-Extra: redis
|
|
34
27
|
Provides-Extra: sodium
|
|
35
28
|
Description-Content-Type: text/markdown
|
|
@@ -65,7 +58,8 @@ backend a constructor argument:
|
|
|
65
58
|
- 🗄️ **Six adapters** — memory, files, Redis, nowhere, a chain of them, or tag-aware on top of any.
|
|
66
59
|
- 🏷️ **Tags** — invalidate every value carrying a tag at once, whatever its key.
|
|
67
60
|
- 🔐 **Encryption** — values encrypted and authenticated with libsodium, for a shared backend.
|
|
68
|
-
- 🧩 **
|
|
61
|
+
- 🧩 **An optional bundle** — named pools configured in Python once xtr-dependency-injection is
|
|
62
|
+
installed beside it, and `cache:pool:*` console commands with xtr-console.
|
|
69
63
|
|
|
70
64
|
```python
|
|
71
65
|
from xtr_cache import FilesystemAdapter, ItemInterface
|
|
@@ -85,14 +79,16 @@ profile = await cache.get(f"profile.{user_id}", load_profile)
|
|
|
85
79
|
|
|
86
80
|
```sh
|
|
87
81
|
uv add xtr-cache
|
|
88
|
-
uv add "xtr-cache[redis]"
|
|
89
|
-
uv add "xtr-cache[sodium]"
|
|
90
|
-
uv add
|
|
91
|
-
uv add
|
|
82
|
+
uv add "xtr-cache[redis]" # RedisAdapter, on redis-py's asyncio client
|
|
83
|
+
uv add "xtr-cache[sodium]" # SodiumMarshaller, on PyNaCl
|
|
84
|
+
uv add xtr-cache xtr-dependency-injection # + the container, for the CacheBundle
|
|
85
|
+
uv add xtr-console # beside it: the cache:pool:* commands
|
|
92
86
|
```
|
|
93
87
|
|
|
94
|
-
Requires Python 3.11+. Depends on `xtr-cache-contracts`, `xtr-clock`,
|
|
95
|
-
`xtr-logging-contracts
|
|
88
|
+
Requires Python 3.11+. Depends on `typing-extensions`, `xtr-cache-contracts`, `xtr-clock`,
|
|
89
|
+
`xtr-lock` and `xtr-logging-contracts` — not on the container: the bundle is used when
|
|
90
|
+
[xtr-dependency-injection](../xtr-dependency-injection) is installed beside the package, never as
|
|
91
|
+
an extra, and the pools work without it.
|
|
96
92
|
|
|
97
93
|
Every contract symbol is re-exported, not redefined: `xtr_cache.CacheInterface is
|
|
98
94
|
xtr_cache_contracts.CacheInterface`, so a library typed against the contract receives these pools
|
|
@@ -298,8 +294,9 @@ until what it encrypted has expired.
|
|
|
298
294
|
Everything adding this package to an application on
|
|
299
295
|
[xtr-dependency-injection](../xtr-dependency-injection) takes — and, read backwards, what removing it undoes.
|
|
300
296
|
|
|
301
|
-
- **Install** — `uv add
|
|
302
|
-
you use
|
|
297
|
+
- **Install** — `uv add xtr-cache xtr-dependency-injection`: the bundle needs the container
|
|
298
|
+
installed beside it, never as an extra. Add `redis` or `sodium` for what you use; install
|
|
299
|
+
xtr-console beside it for the `cache:pool:*` commands, and xtr-logging for a `cache` channel.
|
|
303
300
|
- **Recipe** — `uv run xtr-recipes recipes:sync` does the *Activate* and *Ignore* steps below: it
|
|
304
301
|
lists `CacheBundle` and ignores `/var/`. There is no config file or environment to write.
|
|
305
302
|
- **Activate** — `CacheBundle: {"all": True}` in `BUNDLES` in `<app>/bundles.py`, imported
|
|
@@ -317,7 +314,9 @@ Everything adding this package to an application on
|
|
|
317
314
|
|
|
318
315
|
## Kernel / bundle
|
|
319
316
|
|
|
320
|
-
With [xtr-dependency-injection](../xtr-dependency-injection)
|
|
317
|
+
With [xtr-dependency-injection](../xtr-dependency-injection) installed beside the package — it is
|
|
318
|
+
not a dependency, and nothing outside `xtr_cache.bundle` needs it — list the bundle and name the
|
|
319
|
+
pools:
|
|
321
320
|
|
|
322
321
|
```python
|
|
323
322
|
# app/bundles.py
|
|
@@ -29,7 +29,8 @@ backend a constructor argument:
|
|
|
29
29
|
- 🗄️ **Six adapters** — memory, files, Redis, nowhere, a chain of them, or tag-aware on top of any.
|
|
30
30
|
- 🏷️ **Tags** — invalidate every value carrying a tag at once, whatever its key.
|
|
31
31
|
- 🔐 **Encryption** — values encrypted and authenticated with libsodium, for a shared backend.
|
|
32
|
-
- 🧩 **
|
|
32
|
+
- 🧩 **An optional bundle** — named pools configured in Python once xtr-dependency-injection is
|
|
33
|
+
installed beside it, and `cache:pool:*` console commands with xtr-console.
|
|
33
34
|
|
|
34
35
|
```python
|
|
35
36
|
from xtr_cache import FilesystemAdapter, ItemInterface
|
|
@@ -49,14 +50,16 @@ profile = await cache.get(f"profile.{user_id}", load_profile)
|
|
|
49
50
|
|
|
50
51
|
```sh
|
|
51
52
|
uv add xtr-cache
|
|
52
|
-
uv add "xtr-cache[redis]"
|
|
53
|
-
uv add "xtr-cache[sodium]"
|
|
54
|
-
uv add
|
|
55
|
-
uv add
|
|
53
|
+
uv add "xtr-cache[redis]" # RedisAdapter, on redis-py's asyncio client
|
|
54
|
+
uv add "xtr-cache[sodium]" # SodiumMarshaller, on PyNaCl
|
|
55
|
+
uv add xtr-cache xtr-dependency-injection # + the container, for the CacheBundle
|
|
56
|
+
uv add xtr-console # beside it: the cache:pool:* commands
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
Requires Python 3.11+. Depends on `xtr-cache-contracts`, `xtr-clock`,
|
|
59
|
-
`xtr-logging-contracts
|
|
59
|
+
Requires Python 3.11+. Depends on `typing-extensions`, `xtr-cache-contracts`, `xtr-clock`,
|
|
60
|
+
`xtr-lock` and `xtr-logging-contracts` — not on the container: the bundle is used when
|
|
61
|
+
[xtr-dependency-injection](../xtr-dependency-injection) is installed beside the package, never as
|
|
62
|
+
an extra, and the pools work without it.
|
|
60
63
|
|
|
61
64
|
Every contract symbol is re-exported, not redefined: `xtr_cache.CacheInterface is
|
|
62
65
|
xtr_cache_contracts.CacheInterface`, so a library typed against the contract receives these pools
|
|
@@ -262,8 +265,9 @@ until what it encrypted has expired.
|
|
|
262
265
|
Everything adding this package to an application on
|
|
263
266
|
[xtr-dependency-injection](../xtr-dependency-injection) takes — and, read backwards, what removing it undoes.
|
|
264
267
|
|
|
265
|
-
- **Install** — `uv add
|
|
266
|
-
you use
|
|
268
|
+
- **Install** — `uv add xtr-cache xtr-dependency-injection`: the bundle needs the container
|
|
269
|
+
installed beside it, never as an extra. Add `redis` or `sodium` for what you use; install
|
|
270
|
+
xtr-console beside it for the `cache:pool:*` commands, and xtr-logging for a `cache` channel.
|
|
267
271
|
- **Recipe** — `uv run xtr-recipes recipes:sync` does the *Activate* and *Ignore* steps below: it
|
|
268
272
|
lists `CacheBundle` and ignores `/var/`. There is no config file or environment to write.
|
|
269
273
|
- **Activate** — `CacheBundle: {"all": True}` in `BUNDLES` in `<app>/bundles.py`, imported
|
|
@@ -281,7 +285,9 @@ Everything adding this package to an application on
|
|
|
281
285
|
|
|
282
286
|
## Kernel / bundle
|
|
283
287
|
|
|
284
|
-
With [xtr-dependency-injection](../xtr-dependency-injection)
|
|
288
|
+
With [xtr-dependency-injection](../xtr-dependency-injection) installed beside the package — it is
|
|
289
|
+
not a dependency, and nothing outside `xtr_cache.bundle` needs it — list the bundle and name the
|
|
290
|
+
pools:
|
|
285
291
|
|
|
286
292
|
```python
|
|
287
293
|
# app/bundles.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xtr-cache"
|
|
3
|
-
version = "
|
|
3
|
+
version = "5.0.0"
|
|
4
4
|
description = "Cache pools in memory, in files, in Redis, chained or tag-aware, with stampede protection."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -25,10 +25,10 @@ classifiers = [
|
|
|
25
25
|
]
|
|
26
26
|
dependencies = [
|
|
27
27
|
"typing-extensions>=4.4",
|
|
28
|
-
"xtr-cache-contracts>=
|
|
29
|
-
"xtr-clock>=
|
|
30
|
-
"xtr-lock>=
|
|
31
|
-
"xtr-logging-contracts>=
|
|
28
|
+
"xtr-cache-contracts>=5.0,<6",
|
|
29
|
+
"xtr-clock>=5.0,<6",
|
|
30
|
+
"xtr-lock>=5.0,<6",
|
|
31
|
+
"xtr-logging-contracts>=5.0,<6",
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
[[project.authors]]
|
|
@@ -38,12 +38,6 @@ email = "me@xterr.dev"
|
|
|
38
38
|
[project.optional-dependencies]
|
|
39
39
|
redis = ["redis>=5.0"]
|
|
40
40
|
sodium = ["pynacl>=1.5"]
|
|
41
|
-
di = [
|
|
42
|
-
"xtr-dependency-injection>=4.0,<5",
|
|
43
|
-
"xtr-service-contracts>=4.0,<5",
|
|
44
|
-
]
|
|
45
|
-
console = ["xtr-console>=4.0,<5"]
|
|
46
|
-
logging = ["xtr-logging>=4.0,<5"]
|
|
47
41
|
|
|
48
42
|
[project.entry-points."xtr_dependency_injection.bundles"]
|
|
49
43
|
cache = "xtr_cache.bundle:CacheBundle"
|
|
@@ -61,10 +55,10 @@ dev = [
|
|
|
61
55
|
"ty>=0.0.83",
|
|
62
56
|
"pynacl>=1.5",
|
|
63
57
|
"redis>=5.0",
|
|
64
|
-
"xtr-console>=
|
|
65
|
-
"xtr-dependency-injection>=
|
|
66
|
-
"xtr-logging>=
|
|
67
|
-
"xtr-service-contracts>=
|
|
58
|
+
"xtr-console>=5.0,<6",
|
|
59
|
+
"xtr-dependency-injection>=5.0,<6",
|
|
60
|
+
"xtr-logging>=5.0,<6",
|
|
61
|
+
"xtr-service-contracts>=5.0,<6",
|
|
68
62
|
]
|
|
69
63
|
|
|
70
64
|
[build-system]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xtr-cache"
|
|
3
|
-
version = "
|
|
3
|
+
version = "5.0.0"
|
|
4
4
|
description = "Cache pools in memory, in files, in Redis, chained or tag-aware, with stampede protection."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -22,10 +22,10 @@ classifiers = [
|
|
|
22
22
|
]
|
|
23
23
|
dependencies = [
|
|
24
24
|
"typing-extensions>=4.4",
|
|
25
|
-
"xtr-cache-contracts>=
|
|
26
|
-
"xtr-clock>=
|
|
27
|
-
"xtr-lock>=
|
|
28
|
-
"xtr-logging-contracts>=
|
|
25
|
+
"xtr-cache-contracts>=5.0,<6",
|
|
26
|
+
"xtr-clock>=5.0,<6",
|
|
27
|
+
"xtr-lock>=5.0,<6",
|
|
28
|
+
"xtr-logging-contracts>=5.0,<6",
|
|
29
29
|
]
|
|
30
30
|
|
|
31
31
|
[project.optional-dependencies]
|
|
@@ -35,16 +35,6 @@ redis = [
|
|
|
35
35
|
sodium = [
|
|
36
36
|
"pynacl>=1.5",
|
|
37
37
|
]
|
|
38
|
-
di = [
|
|
39
|
-
"xtr-dependency-injection>=4.0,<5",
|
|
40
|
-
"xtr-service-contracts>=4.0,<5",
|
|
41
|
-
]
|
|
42
|
-
console = [
|
|
43
|
-
"xtr-console>=4.0,<5",
|
|
44
|
-
]
|
|
45
|
-
logging = [
|
|
46
|
-
"xtr-logging>=4.0,<5",
|
|
47
|
-
]
|
|
48
38
|
|
|
49
39
|
# Advertises the bundle so debug:bundles can name it when installed but not listed.
|
|
50
40
|
# Advertising activates nothing: an application lists the bundles it wants.
|
|
@@ -65,10 +55,10 @@ dev = [
|
|
|
65
55
|
"ty>=0.0.83",
|
|
66
56
|
"pynacl>=1.5",
|
|
67
57
|
"redis>=5.0",
|
|
68
|
-
"xtr-console>=
|
|
69
|
-
"xtr-dependency-injection>=
|
|
70
|
-
"xtr-logging>=
|
|
71
|
-
"xtr-service-contracts>=
|
|
58
|
+
"xtr-console>=5.0,<6",
|
|
59
|
+
"xtr-dependency-injection>=5.0,<6",
|
|
60
|
+
"xtr-logging>=5.0,<6",
|
|
61
|
+
"xtr-service-contracts>=5.0,<6",
|
|
72
62
|
]
|
|
73
63
|
|
|
74
64
|
[build-system]
|
|
@@ -26,8 +26,10 @@ the pool logs why.
|
|
|
26
26
|
pool: `get_item`, `get_items`, `save`, `save_deferred`, `commit`, `delete_item`, `clear`.
|
|
27
27
|
- Keys and tags are non-empty strings with none of `{}()/\@:` (`RESERVED_CHARACTERS`); letters,
|
|
28
28
|
digits, `_` and `.` under 64 characters work everywhere. One key holds one type.
|
|
29
|
-
- In an application
|
|
30
|
-
`
|
|
29
|
+
- In an application, with xtr-dependency-injection installed beside the package (it is not a
|
|
30
|
+
dependency): activate `CacheBundle`, name pools in `CacheConfig`, inject `CacheInterface` for
|
|
31
|
+
the `app` pool and `Annotated[CacheInterface, Target("name")]` for another. Without the
|
|
32
|
+
container every pool works the same; only `xtr_cache.bundle` needs it.
|
|
31
33
|
|
|
32
34
|
## Cache a value
|
|
33
35
|
|
|
@@ -174,7 +176,9 @@ rotation.
|
|
|
174
176
|
`CacheBundle` and ignores `/var/`. That is the steps below a recipe can do; the others it prints
|
|
175
177
|
for you to make.
|
|
176
178
|
|
|
177
|
-
1. **Install** — `uv add
|
|
179
|
+
1. **Install** — `uv add xtr-cache xtr-dependency-injection`: the bundle needs the container
|
|
180
|
+
installed beside it, never as an extra. Add `redis` or `sodium` for what you use; install
|
|
181
|
+
xtr-console beside it for the `cache:pool:*` commands, and xtr-logging for a `cache` channel.
|
|
178
182
|
2. **Activate** — `CacheBundle: {"all": True}` in `BUNDLES` in `<app>/bundles.py`, imported from
|
|
179
183
|
`xtr_cache.bundle`.
|
|
180
184
|
3. **Brings along** — the logging and console bundles, when those packages are installed. With
|
|
@@ -11,7 +11,7 @@ from xtr_cache.command import use_pools
|
|
|
11
11
|
use_pools(CachePoolClearer({"app": FilesystemAdapter("app")}))
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Needs
|
|
14
|
+
Needs xtr-console installed beside this package.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
File without changes
|
{xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/.agents/skills/xtr-cache/references/adapters.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xtr_cache-4.0.4 → xtr_cache-5.0.0}/src/xtr_cache/command/cache_pool_invalidate_tags_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|