Muffin-Cache
Muffin-Cache – A simple cache tools for muffin framework.
Requirements
python >= 3.4
muffin >= 0.5.5
muffin-redis >= 0.3.0
Installation
Muffin-Cache should be installed using pip:
pip install muffin-cache
Usage
Add Muffin-Redis and Muffin-Cache to muffin plugin list:
import muffin
app = muffin.Application(
'example',
PLUGINS=(
'muffin_redis',
'muffin_cache',
)
)
And use CacheHandler for class based views:
from muffin_cache import CacheHandler
@app.register('/cached')
class Example(CacheHandler):
def get(self, request):
return 'text'
Or cache_view for functions based views:
from muffin_cache import cache_view
@app.register('/cached')
@cache_view
def example(request):
return 'text'
The cache lifetime is determined by CACHE_LIFETIME setting of muffin application. (the default lifetime is 30 minutes).
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/drgarcia1986/muffin-cache/issues
Contributing
Development of Muffin-Cache happens at: https://github.com/drgarcia1986/muffin-cache
Contributors
drgarcia1986 (Diego Garcia)
License
Licensed under a MIT license.
Metadata
Release files for muffin-cache 0.0.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 | Actions |
|---|---|---|---|---|
| muffin-cache-0.0.1.tar.gz | 4.5 kB | Without provenance | Details for muffin-cache-0.0.1.tar.gz |
Release files / muffin-cache-0.0.1.tar.gz
| Download URL | muffin-cache-0.0.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8074c2e74820da82afdeb3bdef54e83e0c0d507161808873fbb8906096d97283
|
|
BLAKE2b-256 checksum How to use checksums |
beda55685f98e31a5ebc0428dcca6fca6336fb7476bcd43eb34d049ab2080b6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for muffin-cache 0.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.