New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphite memcached integration does not work with django 1.5 #612
Comments
OK, so we need to look into https://docs.djangoproject.com/en/1.5/topics/cache/ (for instance - it looks like 1.4, 1.5, and development 1.6 haven't introduced changes in the docs that stand out from a brief glimpse). |
If I'm reading the configuration correctly, using django >= 1.5, this configuration should work: CACHE_MIDDLEWARE_SECONDS = 60
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': [
'127.0.0.1:11211'
]
}
} My vagrant dev environment is not in any shape to test this. @msn if you have a chance to try this that'd be helpful. |
I can't find it right now but I have opened a pull request for this. On Tuesday, 4 February 2014 at 01:44, Peter N wrote:
|
Fixed in #589. Could somebody close the issue? |
@pcn Your suggestion worked for me. We have Django==1.5.4 and my settings.py reads: if MEMCACHE_HOSTS:
} Make sure the indentation is correct so that Python doesn't complain. |
Closing as it's been fixed in master. |
can you like the commit, just for the record. |
@esc I did 2 comments above -- #612 (comment) |
@brutasse thank you, my bad. |
@pcn + @stevebanik thanks for that!! |
in order for this to work, python client memecahced needs to be installed, right? |
hi, I installed memcached and python-memchace module. Inserted these lines to my local_settings.py file: CACHE_MIDDLEWARE_SECONDS = 60 When I click on a big node on graphite, it is timing out, not able to exapand the node. Any idease what might cause that, how could I increase the timeout value? I get this error from the apache log: RuntimeError: Unable to save data of type <type 'dict'> to cache |
In settings.py, we have the following:
if MEMCACHE_HOSTS:
CACHE_BACKEND = 'memcached://' + ';'.join(MEMCACHE_HOSTS) + ('/?timeout=%d' % DEFAULT_CACHE_DURATION)
However, CACHE_BACKEND was deprecated in django 1.3 and dropped in django 1.5 (https://docs.djangoproject.com/en/1.5/internals/deprecation/).
My fix was to roll back django to version 1.4 in my graphite python virtualenv.
I'd suggest the release notes recommend a version of django >=1.3 (since check-dependencies.py now requires this) and <=1.4 until support for memcache against django 1.5 is added?
Thanks!
The text was updated successfully, but these errors were encountered: