Files
Alexandru Ardelean 062e0cecdd python-cachelib: bump to 0.13.0
Changelog: https://github.com/pallets-eco/cachelib/blob/main/CHANGES.rst

Minor release with improvements to cache backends.
Add test.sh to verify SimpleCache and NullCache operations.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-09 08:00:48 +03:00

22 lines
529 B
Bash
Executable File

#!/bin/sh
[ "$1" = python3-cachelib ] || exit 0
python3 - << 'EOF'
from cachelib import SimpleCache, NullCache
cache = SimpleCache()
cache.set("key", "value")
assert cache.get("key") == "value", "SimpleCache set/get failed"
assert cache.get("missing") is None
cache.delete("key")
assert cache.get("key") is None, "delete failed"
cache.set("a", 1)
cache.set("b", 2)
cache.clear()
assert cache.get("a") is None, "clear failed"
null = NullCache()
null.set("k", "v")
assert null.get("k") is None, "NullCache should not store"
EOF