Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Dogpile support for cherrypy.

Project description

dogpile support for cherrypy.


pip install marbaloo_dogpile


import cherrypy
import marbaloo_dogpile
import os

marbaloo_dogpile.Plugin(cherrypy.engine).subscribe() = marbaloo_dogpile.Tool()

class Root(object):

    def index(self):
        dogpile = cherrypy.request.dogpile
        counter = dogpile.get('counter')
        counter = 0 if isinstance(counter, int) is False else counter
        dogpile.set('counter', counter + 1)
        return str(counter)

root_path = os.path.dirname(__file__)
dogpile_dbm_path = os.path.join(root_path, 'dogpile.dbm')
config = {
    'global': {
        'marbaloo_dogpile': {
            'backend': 'dogpile.cache.dbm',
            'expiration_time': 3600,
            'arguments': {'filename': dogpile_dbm_path},
    '/': {
        'tools.dogpile.on': True
cherrypy.quickstart(Root(), '/', config)

Project details

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
marbaloo_dogpile-0.1.0.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None

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 SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page