Skip to content

Commit

Permalink
Merge pull request #2878 from lrrb/feature/memcached
Browse files Browse the repository at this point in the history
feat: replace python-memcached  with pymemcache
  • Loading branch information
deniszh authored Feb 24, 2025
2 parents d125792 + 524f2bc commit 4472cf3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions check-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ def versiontuple(v):
required += 1


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

Expand Down Expand Up @@ -193,7 +193,7 @@ def versiontuple(v):
'pytz',
'pyparsing',
'tagging',
'memcache',
'pymemcache',
'ldap',
'txamqp',
'rrdtool',
Expand Down
6 changes: 3 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ is part of the Graphite project.

There are also several other dependencies required for additional features:

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

.. toctree::
:maxdepth: 2

config-database-setup
config-webapp
config-local-settings
Expand Down Expand Up @@ -204,7 +204,7 @@ Unfortunately, native Graphite on Windows is completely unsupported, but you can
.. _NOT Python 3: https://python3wos.appspot.com/
.. _pip: https://pip.pypa.io/
.. _python-ldap: https://www.python-ldap.org/
.. _python-memcache: https://www.tummy.com/software/python-memcached/
.. _pymemcache: https://github.com/pinterest/pymemcache
.. _python-rrdtool: http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html
.. _python-sqlite2: https://github.com/ghaering/pysqlite
.. _pytz: https://pypi.python.org/pypi/pytz/
Expand Down
2 changes: 1 addition & 1 deletion webapp/graphite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
# Caching shortcuts
if MEMCACHE_HOSTS:
CACHES['default'] = {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': MEMCACHE_HOSTS,
'TIMEOUT': DEFAULT_CACHE_DURATION,
'KEY_PREFIX': MEMCACHE_KEY_PREFIX,
Expand Down

0 comments on commit 4472cf3

Please sign in to comment.