Skip to content

pymemcache based client for Amazon ElastiCache with auto discovery function

License

Notifications You must be signed in to change notification settings

castlabs/django-elastipymemcache

 
 

Repository files navigation

django-elastipymemcache

https://travis-ci.org/harikitech/django-elastipymemcache.svg?branch=master

Purpose

Simple Django cache backend for Amazon ElastiCache (memcached based). It uses pymemcache and sets up a connection to each node in the cluster using auto discovery. Originally forked from django-elasticache.

Requirements

  • pymemcache==3.4.3
  • Django>=3.2

Installation

Get it from pypi:

pip install django-elastipymemcache

Usage

Your cache backend should look something like this:

CACHES = {
    'default': {
        'BACKEND': 'django_elastipymemcache.backend.ElastiPymemcache',
        'LOCATION': '[configuration endpoint]:11211',
        'OPTIONS': {
          'ignore_exc': True, # pymemcache Client params
          'ignore_cluster_errors': True, # ignore get cluster info error
        }
    }
}

Testing

Run the tests like this:

nosetests

About

pymemcache based client for Amazon ElastiCache with auto discovery function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Dockerfile 0.5%