Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 24, 2018. It is now read-only.

A cache backend for Django using pylibmc

License

NotificationsYou must be signed in to change notification settings

heroku-python/django-pylibmc-sasl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package provides a memcached cache backend for Django usingpylibmc. You want to use pylibmcbecause it's fast.

This is a fork of thedjango-pylibmcpackage. These changes will eventually end up upstream.

Requirements

django-pylibmc-sasl requires Django 1.3. It was written and tested on Python 2.7.x.

Installation

Get it frompypi:

pip install django-pylibmc-sasl

Usage

Your cache backend should look something like this:

CACHES = {    'default': {        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',        'LOCATION': 'localhost:11211',        'TIMEOUT': 500,        'BINARY': True,        'OPTIONS': {  # Maps to pylibmc "behaviors"            'tcp_nodelay': True,            'ketama': True        }    }}

If you want to use the memcached binary protocol, set the BINARY key'svalue to True as shown above. BINARY is False by default.

If you want to controlpylibmc behaviors, use theOPTIONS. OPTIONS is an empty dict by default.

Pylibmc supportscompression and theminimum size (in bytes) of values to compress can be set via the Djangosetting PYLIBMC_MIN_COMPRESS_LEN. The default is 0, which is disabled.

Caveats

This package breaks away from the current handling oftimeout=0 in Django.Django converts 0 into the default timeout, while django-pylibmc leaves it as0. memcached takes 0 to mean "infinite timeout." You can still passNoneto get the default timeout.

About

A cache backend for Django using pylibmc

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python100.0%

[8]ページ先頭

©2009-2025 Movatter.jp