Classic Cache
Classic Cache - предоставляет функциональность кеширования. Предоставляет утилиты для пометки кеша, бекенд для кеширования в RAM и бекенд для кешироавния в Redis.
Установка
Для установки Classic-Cache вы можете использовать pip:
pip install classic-cache
Для установки Classic-Cache с поддержкой Redis:
pip install classic-cache[redis]
Использование
from classic.cache import cached, InMemoryCache, RedisCache
from classic.components import component
@component
class SomeClass:
# Кэширование результата метода some_method на 60 секунд
@cached(ttl=60)
def some_method(self, arg1: int, arg2: int) -> int:
return arg1 + arg2
# кеширование в памяти
cache = InMemoryCache()
# ИЛИ
# кеширование в Redis
cache = RedisCache(connection=Redis())
some_instance = SomeClass(cache=cache)
# ручная инвалидация кэша
some_instance.some_method.invalidate(1, 2)
# ручное обновление кэша
some_instance.some_method.refresh(1, 2)
Metadata
Release files for classic-cache 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| classic_cache-1.2.1.tar.gz | 12.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| classic_cache-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.2 kB
Release files / classic_cache-1.2.1.tar.gz
| Download URL | classic_cache-1.2.1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb98f5cbe4b7f2c2d235ee3006b9aba8f73f1bf51fdc4436ef557510fbcb8cc9
|
|
BLAKE2b-256 checksum How to use checksums |
a6b43a4d7994148823c8e4fe324ca4758fcbcfbf4f1a7993c0868c7755022a49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2025.
Transparency logRelease files / classic_cache-1.2.1-py3-none-any.whl
| Download URL | classic_cache-1.2.1-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62e1bdc8666eaa5c8fc9288a63ac6f2b3e1322164a1ca1a6c3ae7a9c1c9b9b7c
|
|
BLAKE2b-256 checksum How to use checksums |
5c3d80af1a09ec55cb63601fa36ffe82aba13af11130a49b2dc5bb848b2c846d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2025.
Transparency logSecurity for classic-cache 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for classic_cache-1.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.