zoocache 2026.1.20__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.
- zoocache-2026.1.20/.cargo/config.toml +2 -0
- zoocache-2026.1.20/.github/workflows/ci.yml +92 -0
- zoocache-2026.1.20/.github/workflows/release.yml +128 -0
- zoocache-2026.1.20/.gitignore +23 -0
- zoocache-2026.1.20/.python-version +1 -0
- zoocache-2026.1.20/Cargo.lock +980 -0
- zoocache-2026.1.20/Cargo.toml +25 -0
- zoocache-2026.1.20/PKG-INFO +135 -0
- zoocache-2026.1.20/README.md +125 -0
- zoocache-2026.1.20/benchmarks/run_benchmarks.py +109 -0
- zoocache-2026.1.20/benchmarks/run_heavy_load.py +125 -0
- zoocache-2026.1.20/benchmarks/run_lazy_update_bench.py +53 -0
- zoocache-2026.1.20/benchmarks/run_lmdb_bench.py +59 -0
- zoocache-2026.1.20/benchmarks/run_tti_bench.py +58 -0
- zoocache-2026.1.20/docs/adr/0001-prefix-trie-invalidation.md +17 -0
- zoocache-2026.1.20/docs/adr/0002-rust-core-python-wrapper.md +16 -0
- zoocache-2026.1.20/docs/adr/0003-hlc-distributed-consistency.md +15 -0
- zoocache-2026.1.20/docs/adr/0004-serialization-strategy.md +18 -0
- zoocache-2026.1.20/docs/adr/0005-singleflight-pattern.md +15 -0
- zoocache-2026.1.20/docs/adr/0006-trie-performance-optimizations.md +18 -0
- zoocache-2026.1.20/docs/adr/0007-zero-bridge-serialization.md +18 -0
- zoocache-2026.1.20/docs/adr/0008-redis-bus-connection-pooling.md +17 -0
- zoocache-2026.1.20/docs/architecture.md +28 -0
- zoocache-2026.1.20/docs/assets/architecture.svg +41 -0
- zoocache-2026.1.20/docs/assets/entities.svg +162 -0
- zoocache-2026.1.20/docs/assets/favicon.svg +21 -0
- zoocache-2026.1.20/docs/assets/hlc_consistency.svg +40 -0
- zoocache-2026.1.20/docs/assets/invalidation.svg +35 -0
- zoocache-2026.1.20/docs/assets/logo-dark.svg +45 -0
- zoocache-2026.1.20/docs/assets/logo-light.svg +43 -0
- zoocache-2026.1.20/docs/assets/serialization.svg +28 -0
- zoocache-2026.1.20/docs/concurrency.md +25 -0
- zoocache-2026.1.20/docs/consistency.md +32 -0
- zoocache-2026.1.20/docs/invalidation.md +27 -0
- zoocache-2026.1.20/docs/reliability.md +56 -0
- zoocache-2026.1.20/docs/serialization.md +25 -0
- zoocache-2026.1.20/docs/user_guide.md +421 -0
- zoocache-2026.1.20/examples/usage_demo.py +80 -0
- zoocache-2026.1.20/lint.sh +3 -0
- zoocache-2026.1.20/pyproject.toml +32 -0
- zoocache-2026.1.20/src/zoocache/__init__.py +13 -0
- zoocache-2026.1.20/src/zoocache/context.py +33 -0
- zoocache-2026.1.20/src/zoocache/core.py +158 -0
- zoocache-2026.1.20/src/zoocache_core/bus/local.rs +13 -0
- zoocache-2026.1.20/src/zoocache_core/bus/mod.rs +9 -0
- zoocache-2026.1.20/src/zoocache_core/bus/redis_pubsub.rs +82 -0
- zoocache-2026.1.20/src/zoocache_core/flight.rs +83 -0
- zoocache-2026.1.20/src/zoocache_core/lib.rs +294 -0
- zoocache-2026.1.20/src/zoocache_core/storage/lmdb.rs +182 -0
- zoocache-2026.1.20/src/zoocache_core/storage/memory.rs +90 -0
- zoocache-2026.1.20/src/zoocache_core/storage/mod.rs +89 -0
- zoocache-2026.1.20/src/zoocache_core/storage/redis.rs +154 -0
- zoocache-2026.1.20/src/zoocache_core/trie.rs +458 -0
- zoocache-2026.1.20/tests/conftest.py +9 -0
- zoocache-2026.1.20/tests/test_async.py +25 -0
- zoocache-2026.1.20/tests/test_complex_sqlite.py +219 -0
- zoocache-2026.1.20/tests/test_concurrency.py +121 -0
- zoocache-2026.1.20/tests/test_fixed_ttl.py +49 -0
- zoocache-2026.1.20/tests/test_invalidation.py +86 -0
- zoocache-2026.1.20/tests/test_lru_eviction.py +81 -0
- zoocache-2026.1.20/tests/test_multiprocess_lmdb.py +81 -0
- zoocache-2026.1.20/tests/test_passive_resync.py +64 -0
- zoocache-2026.1.20/tests/test_storage.py +29 -0
- zoocache-2026.1.20/tests/test_ttl.py +88 -0
- zoocache-2026.1.20/uv.lock +356 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, master, dev ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, master, dev ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
rust:
|
|
15
|
+
name: Rust
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.10"
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v5
|
|
27
|
+
with:
|
|
28
|
+
enable-cache: true
|
|
29
|
+
cache-dependency-glob: "uv.lock"
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: uv sync --all-extras --dev
|
|
33
|
+
|
|
34
|
+
- name: Install Rust
|
|
35
|
+
uses: dtolnay/rust-toolchain@stable
|
|
36
|
+
with:
|
|
37
|
+
components: clippy
|
|
38
|
+
|
|
39
|
+
- name: Rust Cache
|
|
40
|
+
uses: Swatinem/rust-cache@v2
|
|
41
|
+
|
|
42
|
+
- name: Run Clippy
|
|
43
|
+
run: uv run cargo clippy --all-targets --all-features -- -D warnings
|
|
44
|
+
|
|
45
|
+
- name: Run Rust Tests
|
|
46
|
+
run: uv run cargo test --all-features
|
|
47
|
+
|
|
48
|
+
python:
|
|
49
|
+
name: Python
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
needs: rust
|
|
52
|
+
services:
|
|
53
|
+
redis:
|
|
54
|
+
image: redis
|
|
55
|
+
ports:
|
|
56
|
+
- 6379:6379
|
|
57
|
+
options: >-
|
|
58
|
+
--health-cmd "redis-cli ping"
|
|
59
|
+
--health-interval 10s
|
|
60
|
+
--health-timeout 5s
|
|
61
|
+
--health-retries 5
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v4
|
|
64
|
+
|
|
65
|
+
- name: Install Rust
|
|
66
|
+
uses: dtolnay/rust-toolchain@stable
|
|
67
|
+
|
|
68
|
+
- name: Rust Cache
|
|
69
|
+
uses: Swatinem/rust-cache@v2
|
|
70
|
+
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@v5
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.10"
|
|
75
|
+
|
|
76
|
+
- name: Install uv
|
|
77
|
+
uses: astral-sh/setup-uv@v5
|
|
78
|
+
with:
|
|
79
|
+
enable-cache: true
|
|
80
|
+
cache-dependency-glob: "uv.lock"
|
|
81
|
+
|
|
82
|
+
- name: Install dependencies
|
|
83
|
+
run: uv sync --all-extras --dev
|
|
84
|
+
|
|
85
|
+
- name: Build extension (maturin develop)
|
|
86
|
+
run: uv run maturin develop
|
|
87
|
+
|
|
88
|
+
- name: Lint with Ruff
|
|
89
|
+
run: uv run ruff check .
|
|
90
|
+
|
|
91
|
+
- name: Run tests
|
|
92
|
+
run: uv run pytest
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linux:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
include:
|
|
17
|
+
- target: x86_64
|
|
18
|
+
sccache: 'true'
|
|
19
|
+
- target: aarch64
|
|
20
|
+
sccache: 'true'
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- name: Rust Cache
|
|
24
|
+
uses: Swatinem/rust-cache@v2
|
|
25
|
+
- name: Build wheels
|
|
26
|
+
uses: PyO3/maturin-action@v1.49.4
|
|
27
|
+
with:
|
|
28
|
+
target: ${{ matrix.target }}
|
|
29
|
+
args: --release --out dist --find-interpreter
|
|
30
|
+
sccache: ${{ matrix.sccache }}
|
|
31
|
+
manylinux: 2_28
|
|
32
|
+
zig: true
|
|
33
|
+
uv: true
|
|
34
|
+
- name: Upload wheels
|
|
35
|
+
uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: wheels-linux-${{ matrix.target }}
|
|
38
|
+
path: dist
|
|
39
|
+
|
|
40
|
+
windows:
|
|
41
|
+
runs-on: windows-latest
|
|
42
|
+
strategy:
|
|
43
|
+
matrix:
|
|
44
|
+
target: [x64]
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: '3.10'
|
|
50
|
+
- name: Rust Cache
|
|
51
|
+
uses: Swatinem/rust-cache@v2
|
|
52
|
+
- name: Build wheels
|
|
53
|
+
uses: PyO3/maturin-action@v1.49.4
|
|
54
|
+
with:
|
|
55
|
+
target: ${{ matrix.target }}
|
|
56
|
+
args: --release --out dist --find-interpreter
|
|
57
|
+
sccache: 'true'
|
|
58
|
+
uv: true
|
|
59
|
+
- name: Upload wheels
|
|
60
|
+
uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: wheels-windows-${{ matrix.target }}
|
|
63
|
+
path: dist
|
|
64
|
+
|
|
65
|
+
macos:
|
|
66
|
+
runs-on: macos-latest
|
|
67
|
+
strategy:
|
|
68
|
+
matrix:
|
|
69
|
+
target: [x86_64, aarch64]
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
- uses: actions/setup-python@v5
|
|
73
|
+
with:
|
|
74
|
+
python-version: '3.10'
|
|
75
|
+
- name: Rust Cache
|
|
76
|
+
uses: Swatinem/rust-cache@v2
|
|
77
|
+
- name: Build wheels
|
|
78
|
+
uses: PyO3/maturin-action@v1.49.4
|
|
79
|
+
with:
|
|
80
|
+
target: ${{ matrix.target }}
|
|
81
|
+
args: --release --out dist --find-interpreter
|
|
82
|
+
sccache: 'true'
|
|
83
|
+
uv: true
|
|
84
|
+
- name: Upload wheels
|
|
85
|
+
uses: actions/upload-artifact@v4
|
|
86
|
+
with:
|
|
87
|
+
name: wheels-macos-${{ matrix.target }}
|
|
88
|
+
path: dist
|
|
89
|
+
|
|
90
|
+
sdist:
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
steps:
|
|
93
|
+
- uses: actions/checkout@v4
|
|
94
|
+
- name: Build sdist
|
|
95
|
+
uses: PyO3/maturin-action@v1.49.4
|
|
96
|
+
with:
|
|
97
|
+
command: sdist
|
|
98
|
+
args: --out dist
|
|
99
|
+
uv: true
|
|
100
|
+
- name: Upload sdist
|
|
101
|
+
uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: sdist
|
|
104
|
+
path: dist
|
|
105
|
+
|
|
106
|
+
release:
|
|
107
|
+
name: Release
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
if: "startsWith(github.ref, 'refs/tags/')"
|
|
110
|
+
needs: [linux, windows, macos, sdist]
|
|
111
|
+
permissions:
|
|
112
|
+
id-token: write # Mandatory for trusted publishing
|
|
113
|
+
steps:
|
|
114
|
+
- name: Download all wheels
|
|
115
|
+
uses: actions/download-artifact@v4
|
|
116
|
+
with:
|
|
117
|
+
path: dist
|
|
118
|
+
pattern: wheels-*
|
|
119
|
+
merge-multiple: true
|
|
120
|
+
- name: Download sdist
|
|
121
|
+
uses: actions/download-artifact@v4
|
|
122
|
+
with:
|
|
123
|
+
name: sdist
|
|
124
|
+
path: dist
|
|
125
|
+
- name: Publish to PyPI
|
|
126
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
127
|
+
with:
|
|
128
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.ruff_cache/
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv
|
|
13
|
+
|
|
14
|
+
# coverage files
|
|
15
|
+
.coverage
|
|
16
|
+
htmlcov/
|
|
17
|
+
|
|
18
|
+
# Rust-generated files
|
|
19
|
+
target/
|
|
20
|
+
*.so
|
|
21
|
+
|
|
22
|
+
# LMDB files
|
|
23
|
+
*.mdb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|