Skip to main content

Cache worker for gunicorn

Project description

https://img.shields.io/travis/youngking/gunicorn_cache.svg https://img.shields.io/pypi/v/gunicorn_cache.svg

Cache worker for gunicorn

  • Free software: ISC license

Usage

Add these settings in Gunicorn configuration file:

cache_route = [
    {'url': '^/custom_url1', 'methods':['GET', 'POST'], 'expire': 500},
    {'url': '^/custom_url2', 'methods': ['POST'], 'expire': 500, 'prolong': False}
]

cache_store = {'redis_url':'redis://127.0.0.1:6379/0'}

worker_class = 'gunicorn_cache.RedisWorker'

Note

prolong will auto prolong cache’s lifetime if visit again, default is True

Then run the gunicorn.

Advance Usage

Refresh cache

curl -H "GUNICORN_CACHE_REFRESH:true" -X <method> <url>

Features

  • TODO

History

0.1.5 (2016-01-07)

  • Improve refresh cache

0.1.4 (2016-01-07)

  • Add refresh cache method

0.1.3 (2015-12-23)

  • Fix a response duplicated set bug

0.1.1 (2015-12-16)

  • Change configuration
  • add prolong feature

0.1.0 (2015-12-15)

  • First release on PyPI.

Project details


Release history Release notifications

This version

0.1.5

Download files

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

Files for gunicorn_cache, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size gunicorn_cache-0.1.5.tar.gz (13.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page