Git Product home page Git Product logo

django-ascii's Introduction

memcachier-django-ascii

This package provides a memcached cache backend for Django using pymemcache. We generally prefer pylibmc but it depends on a libmemcached which can sometimes cause issues. Pymemcache is a pure python client.

This package only works with the ASCII protocol and a single memcache server.

NOTE: In general we recommend django-pylibmc, but in rare situations this package works better.

MemCachier & Authentication

This backend only supports the memcached ASCII protocol, which normally doesn't support authentication. MemCachier requires authentication, and adds it in very simply by requiring all new connections issue a set:

$ set <username> 0 0 <password length>\r\n
$ <password>\r\n

formatted as above to communicate credentials.

Requirements

Requires Django 1.3+. It was written and tested on Python 2.7.

Installation

Get it from pypi:

$ pip install memcachier-django-ascii

or github:

$ pip install -e git://github.com/memcachier/django-ascii.git

Usage

Your cache backend should look something like this:

CACHES = {
    'default': {
        'BACKEND': 'memcachier_django.ascii.MemcacheCache',
        'OPTIONS': {
            'no_delay': True,
            'connect_timeout': 2,
            'timeout': 2,
            'ignore_exc': True,
        }
    }
}

NOTE: The backend currently only supports connecting to one server.

Configuration with Environment Variables

Optionally, the memcached connection can be configured with environment variables (on platforms like Heroku). To do so, declare the following variables:

MEMCACHE_SERVERS
MEMCACHE_USERNAME
MEMCACHE_PASSWORD

Author

Forked from django-pymemcache.

Get involved!

We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.

Please report bugs via the github issue tracker.

Master git repository:

  • git clone git://github.com/memcachier/django-ascii.git

Licensing

This library is licensed under the Apache Software License 2.0

django-ascii's People

Contributors

dterei avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.