Cache for nameko services
Project description
nameko-cache
Cache for nameko services
Installation
pip install nameko-cache
Usage
app.py
from datetime import datetime
from nameko.rpc import rpc
from nameko_redisy import Redis
from nameko_cache import cached, delete_cached
class FooService(object):
name = 'foo_service'
cache = Redis('CACHE_REDIS_URI')
@rpc
@cached(timeout=10)
def hello(name):
return 'hello {} at {}'.format(name, datetime.now())
@rpc
def world(self):
delete_cached(self.hello, ['john'])
config.yml
AMQP_URI: 'pyamqp://guest:guest@localhost'
CACHE_REDIS_URI: 'redis://127.0.0.1'
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
nameko-cache-1.0.6.win32.zip
(3.7 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 nameko-cache-1.0.6.win32.zip.
File metadata
- Download URL: nameko-cache-1.0.6.win32.zip
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06cbdf25e41a2151e11679ce51e5330cd56a7f89651ca459d7937a1ce6ceba7f
|
|
| MD5 |
749ed3cf844ad424e59be241814ff644
|
|
| BLAKE2b-256 |
f1ccdaede5e011d1e909c04bc151f608233ed30c93281551624a1913e896aa75
|
File details
Details for the file nameko_cache-1.0.6-py2-none-any.whl.
File metadata
- Download URL: nameko_cache-1.0.6-py2-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9102d6fe5c448a152362335edeaf2b1e9490110ba442f4386c50eda6f5b34869
|
|
| MD5 |
6957b4bd9b45954fb0b35c678825d0eb
|
|
| BLAKE2b-256 |
2beb99be5945442eedc51ee6c982c2c2f184c8612c1a43dfc98da479e1a5c944
|