Skip to main content

UNKNOWN

Project description

Muffin-Cache – A simple cache tools for muffin framework.

Build Status Coverals

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

License

Licensed under a MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muffin-cache-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file muffin-cache-0.0.1.tar.gz.

File metadata

File hashes

Hashes for muffin-cache-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8074c2e74820da82afdeb3bdef54e83e0c0d507161808873fbb8906096d97283
MD5 03eb8a199edecc61ca93060be8cd5eb2
BLAKE2b-256 beda55685f98e31a5ebc0428dcca6fca6336fb7476bcd43eb34d049ab2080b6c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page