Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A django-debug-toolbar panel for memcached debugging information (memcache and pylibmc supported)

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rst

Django Debug Toolbar Memcache

This is a fork of Ross's excellent Memcache Debug Toolbar. It's an add-on for Django Debug Toolbar for tracking memcached usage. It currently supports both the pylibmc and memcache libraries.

In this fork I'm refactoring the project to be more in line with django-debug-toolbar panels. And I use its utilities and helpers to implement this panel. It is based on the sql toolbar and has similar presentation and information.

These are some further technical differences from Memcache Debug Toolbar:

  • No more inheriting client classes. Just using replace_call on the client methods. Which means explicit import is not needed
  • Use utilities from debug_toolbar. Not sure why that would blow up.
  • Record directly to panel instance instead of a Calls instance. Should be more thread safe.
  • Collect and display template information from the stack trace.
  • Display stacktrace and template info the same way sql panel does.
  • Use same row toggle logic as sql panel, skip extra jquery.

Installation

  1. Install and configure Django Debug Toolbar.
  2. Add the debug_toolbar_memcache app to your INSTALLED_APPS.

Configuration

  1. Add the memcache or pylibmc panel to DEBUG_TOOLBAR_PANELS.

    You'll need to add the panel corresponding to the library you'll be using to the list of debug toolbar's panels in the order in which you'd like it to appear:

    DEBUG_TOOLBAR_PANELS = (
        ...
        'debug_toolbar_memcache.panels.memcache.MemcachePanel',
        # if you use pylibmc you'd include its panel instead
        # 'debug_toolbar_memcache.panels.pylibmc.PylibmcPanel',
    )
    
Something went wrong with that request. Please try again.