Skip to main content

Cache manager

Простой кеш - хранение в файлах:

from cache_manager.pickle import PickleCache
from datetime import timedelta

cache_manager = PickleCache('./cache')

@cache_manager(ttl=timedelta(hours=1))
def some_function():
    pass

Memcached:

from cache_manager.memcached import MemcachedCache
from datetime import timedelta

cache_manager = MemcachedCache(('10.5.0.11', 11211)) # в случае соединения по TCP или UDP сокету
cache_manager = MemcachedCache('/usr/run/memcached.sock') # в случае соединия по unix сокету

@cache_manager(ttl=timedelta(hours=1))
def some_function():
    pass

Redis:

from cache_manager.redis import RedisCache
from datetime import timedelta

cache_manager = RedisCache(('10.5.0.11', 6379), password='somepassword') # в случае соединения по TCP или UDP сокету
cache_manager = RedisCache('/usr/run/redis.sock', password='somepassword') # в случае соединия по unix сокету

@cache_manager(ttl=timedelta(hours=1))
def some_function():
    pass

Etcd:

from cache_manager.etcd import EtcdCache
from datetime import timedelta

cache_manager = EtcdCache(('10.5.0.11', 2371), scheme='http')

@cache_manager(ttl=timedelta(hours=1))
def some_function():
    pass

Metadata

Release files for cache-manager 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cache-manager 0.1
File Size Uploaded Provenance Actions
cache_manager-0.1.tar.gz 4.1 kB Without provenance Details for cache_manager-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cache-manager 0.1
File Interpreter ABI Platform Actions
cache_manager-0.1-py3-none-any.whl Python 3 none any Details for cache_manager-0.1-py3-none-any.whl

Total release size: 10.0 kB

Release files / cache_manager-0.1.tar.gz

Download URL cache_manager-0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2c8448b34bdde89f95c164911e3b3b52d62977aa176bed75f481f5a7989a55b6
BLAKE2b-256 checksum
How to use checksums
10e3e24c590a2230f7ba48d505cadfbb6541c405ca0a7bd2983a810d93ef07f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / cache_manager-0.1-py3-none-any.whl

Download URL cache_manager-0.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
496fd7d4c971c18614604aadf46cf95fd5538a57b31f878a64c79fea8c38eb1d
BLAKE2b-256 checksum
How to use checksums
9165b3aa785540ad071f212ff3a5ec93809b2e408884463639eab5256cfcf3f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Security for cache-manager 0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page