Simple cache manager
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cache_manager-0.1.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cache_manager-0.1.tar.gz.
File metadata
- Download URL: cache_manager-0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c8448b34bdde89f95c164911e3b3b52d62977aa176bed75f481f5a7989a55b6
|
|
| MD5 |
26af7dc4efcf1684a25714f327acca78
|
|
| BLAKE2b-256 |
10e3e24c590a2230f7ba48d505cadfbb6541c405ca0a7bd2983a810d93ef07f2
|
File details
Details for the file cache_manager-0.1-py3-none-any.whl.
File metadata
- Download URL: cache_manager-0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
496fd7d4c971c18614604aadf46cf95fd5538a57b31f878a64c79fea8c38eb1d
|
|
| MD5 |
ecfac35205063d6f854bcd469d019b54
|
|
| BLAKE2b-256 |
9165b3aa785540ad071f212ff3a5ec93809b2e408884463639eab5256cfcf3f6
|