Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
28583bb
...
awolverp May 17, 2026
e6a5c9d
Start refactoring to v6
awolverp May 17, 2026
b6eafc6
Refactor Cache ( not tested )
awolverp May 18, 2026
aaa2feb
Update Cargo.lock
awolverp May 18, 2026
c848ac0
Update exports
awolverp May 18, 2026
6114962
Test Cache, Fix a bug
awolverp May 19, 2026
618f9ec
Update cache structures
awolverp May 19, 2026
cd9a3f3
Fix cargo clippy warnings
awolverp May 19, 2026
de61021
Remove optimize attributes, and add some inline attributes; Change au…
awolverp May 19, 2026
3121248
Optimize performance
awolverp May 19, 2026
59d423a
Refactor and test a big part of FIFOCache implementation ( Commit 1/2 )
awolverp May 21, 2026
caa643a
Refactor FIFOCache
awolverp May 21, 2026
eb67c66
Refactor RRCache
awolverp May 22, 2026
72650a0
Refactor LRUCache
awolverp May 23, 2026
dd6ecb2
Refactor LFU
awolverp May 24, 2026
1b69b8f
Improve LFU tests
awolverp May 24, 2026
8b2c9ef
Refactor TTLCache & fix some bugs
awolverp May 25, 2026
1eab960
Optimize performance of TTLCache.expire
awolverp May 25, 2026
904ca7c
Add simple benchmarks in pytest
awolverp May 25, 2026
578b0d8
Support background sweeper for TTLCache
awolverp May 25, 2026
2210ae5
remove unused `py` parameter from eviction methods
awolverp May 26, 2026
ff52f60
Use `u128` instead of `usize` in LFU frequency counter to support more
awolverp May 26, 2026
ae5dfc6
Update documentations to use Google Style.
awolverp May 26, 2026
6389dae
Support LFUCache.items_with_frequency
awolverp May 26, 2026
2cd088a
Remove the BaseIteratorImpl baseclass
awolverp May 26, 2026
7acbf10
Refactor VTTLCache & improve performance
awolverp May 26, 2026
c686f79
Fix VTTLCache expiry, and change __repr__ formats
awolverp May 27, 2026
3a91f70
Support negative `ttl`s in VTTLCache
awolverp May 27, 2026
0fc2863
Complete refcatoring VTTLCache
awolverp May 27, 2026
b0f3e59
Update tests
awolverp May 27, 2026
7827caf
Add tests for sweep_intervals, improve performance of __eq/ne__
awolverp May 27, 2026
c051b4c
Support pickle & deepcopy for Cache/RRCache
awolverp May 28, 2026
412f608
Fix Cache/RRCache pickle loads & Support pickle for FIFOCache.
awolverp May 29, 2026
910a344
Fix wording in doccomments
awolverp May 29, 2026
75b9a5e
Support pickle for LFUCache
awolverp May 29, 2026
008577a
Support pickle for LRUCache
awolverp May 29, 2026
e407327
Support pickle for TTLCache/VTTLCache
awolverp May 29, 2026
7bd159b
Complete refactoring pickle & deepcopy
awolverp May 29, 2026
201ba14
Add __version__ variable
awolverp May 29, 2026
f205e6b
Optimize all `items`/`keys`/`values` methods
awolverp May 30, 2026
9747a14
Refactor & optimize `utils`
awolverp May 30, 2026
91a8ded
Fix & test utils
awolverp May 30, 2026
e086408
Update README.md
awolverp May 31, 2026
6811356
Write docs using mkdocs-material
awolverp May 31, 2026
2750212
Update docs
awolverp May 31, 2026
840e571
Update __sizeof__ methods, and complete docs
awolverp Jun 1, 2026
82e5142
Update docs
awolverp Jun 1, 2026
d74ebfa
Remove benchmarks from tests
awolverp Jun 1, 2026
95ce03d
Fix tests and utils
awolverp Jun 1, 2026
1701769
Update README.md
awolverp Jun 1, 2026
647eb9f
Update github workflows
awolverp Jun 1, 2026
f26b768
Update github workflows
awolverp Jun 1, 2026
79bbd3c
Update github workflows
awolverp Jun 1, 2026
d447738
Fix typing errors
awolverp Jun 1, 2026
d7231e3
Fix PyPy; PyPy doesn't have PyTuple_SET_ITEM and we should use PyTupl…
awolverp Jun 1, 2026
5b387d7
Fix FIFOCache & TTLCache internal decrement_indexes function
awolverp Jun 1, 2026
cb7befe
Fix tests
awolverp Jun 1, 2026
a9d8549
Merge branch 'main' into v6
awolverp Jun 1, 2026
13321bc
Improve FIFOCache/TTLCache tests
awolverp Jun 1, 2026
d424800
Add mkdocs github workflow
awolverp Jun 1, 2026
64f1977
Merge branch 'v6' of https://github.com/awolverp/cachebox into v6
awolverp Jun 1, 2026
7f8f3d4
Update docs
awolverp Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 98 additions & 122 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,259 +1,235 @@
name: CI
name: Publish

on:
push:
tags:
- '*'
- "*"

workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}

jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- {
runner: ubuntu-latest,
target: x86_64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "--features mimalloc",
}
- {
runner: ubuntu-latest,
target: x86,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "--features mimalloc",
}
- {
runner: ubuntu-latest,
target: aarch64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "--features mimalloc --zig",
}
- {
runner: ubuntu-latest,
target: armv7,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "",
}
- {
runner: ubuntu-latest,
target: s390x,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "",
}
- {
runner: ubuntu-latest,
target: ppc64le,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
maturin-args: "",
}

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6

- uses: actions/setup-python@v6.2.0
with:
python-version: 3.x

- name: "Build wheels"
uses: PyO3/maturin-action@v1.49.4
python-version: "3.x"

- uses: PyO3/maturin-action@v1.51.0
with:
target: ${{ matrix.platform.target }}
args: >
--release --out dist ${{ matrix.platform.maturin-args }}
--interpreter ${{ matrix.platform.interpreter }}
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
rust-toolchain: nightly

- name: "Upload wheels"
uses: actions/upload-artifact@v4.6.2

- uses: actions/upload-artifact@v7.0.1
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
musllinux:
runs-on: ${{ matrix.platform.runner }}

build-musllinux:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- {
runner: ubuntu-latest,
target: x86_64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}
- {
runner: ubuntu-latest,
target: x86,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}
- {
runner: ubuntu-latest,
target: aarch64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}
- {
runner: ubuntu-latest,
target: armv7,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6

- uses: actions/setup-python@v6.2.0
with:
python-version: 3.x
- name: "Build wheels"
uses: PyO3/maturin-action@v1.49.4
python-version: "3.x"

- uses: PyO3/maturin-action@v1.51.0
with:
target: ${{ matrix.platform.target }}
args: >
--release --out dist
--interpreter ${{ matrix.platform.interpreter }}
--features mimalloc
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
rust-toolchain: nightly

- name: "Upload wheels"
uses: actions/upload-artifact@v4.6.2

- uses: actions/upload-artifact@v7.0.1
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
windows:
runs-on: ${{ matrix.platform.runner }}

build-windows:
runs-on: windows-latest
strategy:
matrix:
platform:
- {
runner: windows-latest,
target: x64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
}
- {
runner: windows-latest,
target: x86,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t"
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}
- { target: x86, interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t" }

steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6.0.0

- uses: actions/setup-python@v6.2.0
with:
python-version: 3.x
python-version: "3.x"
architecture: ${{ matrix.platform.target }}
- name: "Build wheels"
uses: PyO3/maturin-action@v1.49.4

- uses: PyO3/maturin-action@v1.51.0
with:
target: ${{ matrix.platform.target }}
args: >
--release --out dist
--interpreter ${{ matrix.platform.interpreter }}
--features mimalloc
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
rust-toolchain: nightly

- name: "Upload wheels"
uses: actions/upload-artifact@v4.6.2
- uses: actions/upload-artifact@v7.0.1
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
build-macos:
runs-on: macos-latest
strategy:
matrix:
platform:
- {
runner: macos-latest,
target: x86_64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
}
target: x86_64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}
- {
runner: macos-latest,
target: aarch64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11"
}
target: aarch64,
interpreter: "3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11",
}

steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6.0.0

- uses: actions/setup-python@v6.2.0
with:
python-version: 3.x

- name: "Build wheels"
uses: PyO3/maturin-action@v1.49.4
python-version: "3.x"

- uses: PyO3/maturin-action@v1.51.0
with:
target: ${{ matrix.platform.target }}
args: >
--release --out dist
--interpreter ${{ matrix.platform.interpreter }}
--features mimalloc
args: --release --out dist --interpreter ${{ matrix.platform.interpreter }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
rust-toolchain: nightly

- name: "Upload wheels"
uses: actions/upload-artifact@v4.6.2
- uses: actions/upload-artifact@v7.0.1
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

build-sdist:
name: "build sdist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- name: "Build sdist"
uses: PyO3/maturin-action@v1.49.4

- name: Build sdist
uses: PyO3/maturin-action@v1.51.0
with:
command: sdist
args: --out dist
rust-toolchain: nightly
- name: "Upload sdist"
uses: actions/upload-artifact@v4.6.2

- name: Upload sdist
uses: actions/upload-artifact@v7.0.1
with:
name: wheels-sdist
path: dist

release:
name: "release"
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, build-sdist]
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
needs:
- build-linux
- build-musllinux
- build-windows
- build-macos
- build-sdist

permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write

steps:
- uses: actions/download-artifact@v5.0.0
- name: "Generate artifact attestation"
uses: actions/attest-build-provenance@v3.0.0
- uses: actions/download-artifact@v8.0.1
with:
subject-path: "wheels-*/*"

- name: "Publish to PyPI"
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1.49.4
pattern: wheels-*
merge-multiple: true
path: dist

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v4.1.0
with:
subject-path: dist/*

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: PyO3/maturin-action@v1.51.0
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
args: --non-interactive --skip-existing dist/*
rust-toolchain: nightly
Loading
Loading