Skip to content

Commit 4472cf3

Browse files
authored
Merge pull request graphite-project#2878 from lrrb/feature/memcached
feat: replace python-memcached with pymemcache
2 parents d125792 + 524f2bc commit 4472cf3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

check-dependencies.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ def versiontuple(v):
117117
required += 1
118118

119119

120-
# Test for python-memcached
120+
# Test for pymemcache
121121
try:
122-
import memcache
122+
import pymemcache
123123
except ImportError:
124-
sys.stderr.write("[OPTIONAL] Unable to import the 'memcache' module, "
125-
"do you have python-memcached installed for python %s? "
124+
sys.stderr.write("[OPTIONAL] Unable to import the 'pymemcache' module, "
125+
"do you have pymemcache installed for python %s? "
126126
"This feature is not required but greatly improves performance.\n" % sys.version_info.major)
127127
optional += 1
128128

@@ -193,7 +193,7 @@ def versiontuple(v):
193193
'pytz',
194194
'pyparsing',
195195
'tagging',
196-
'memcache',
196+
'pymemcache',
197197
'ldap',
198198
'txamqp',
199199
'rrdtool',

docs/install.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ is part of the Graphite project.
5353

5454
There are also several other dependencies required for additional features:
5555

56-
* Render caching: `memcached`_ and `python-memcache`_
56+
* Render caching: `memcached`_ and `pymemcache`_
5757
* LDAP authentication: `python-ldap`_ (for LDAP authentication support in the webapp)
5858
* AMQP support: `txamqp`_ (version 0.8 is required)
5959
* RRD support: `python-rrdtool`_
@@ -145,7 +145,7 @@ Initial Configuration
145145

146146
.. toctree::
147147
:maxdepth: 2
148-
148+
149149
config-database-setup
150150
config-webapp
151151
config-local-settings
@@ -204,7 +204,7 @@ Unfortunately, native Graphite on Windows is completely unsupported, but you can
204204
.. _NOT Python 3: https://python3wos.appspot.com/
205205
.. _pip: https://pip.pypa.io/
206206
.. _python-ldap: https://www.python-ldap.org/
207-
.. _python-memcache: https://www.tummy.com/software/python-memcached/
207+
.. _pymemcache: https://github.com/pinterest/pymemcache
208208
.. _python-rrdtool: http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html
209209
.. _python-sqlite2: https://github.com/ghaering/pysqlite
210210
.. _pytz: https://pypi.python.org/pypi/pytz/

webapp/graphite/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
# Caching shortcuts
324324
if MEMCACHE_HOSTS:
325325
CACHES['default'] = {
326-
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
326+
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
327327
'LOCATION': MEMCACHE_HOSTS,
328328
'TIMEOUT': DEFAULT_CACHE_DURATION,
329329
'KEY_PREFIX': MEMCACHE_KEY_PREFIX,

0 commit comments

Comments
 (0)