Re: Using Memcached on Heroku
For me worked with a snippet i've added in settings.
if os.environ.get('MEMCACHE_SERVERS'):
CACHES = {
'default': {
'BACKEND':
'django.core.cache.backends.memcached.PyLibMCCache',
'LOCATION': '{host}:11211'.format(
host=os.environ.get('MEMCACHE_SERVERS')),
'username': os.environ.get('MEMCACHE_USERNAME'),
'password': os.environ.get('MEMCACHE_PASSWORD')
}
}
However you can't compile pylibmc, i'm finding a way to do it.
On Nov 16, 10:07 am, GuyBowden <guy.bow...@gmail.com> wrote:
> Hi,
>
> I have a django app running on Heroku - I've just added memcached to
> the app and have got a server location plus username and password for
> the memcached server.
>
> How do I put the username / password into the cache settings in my
> settings.py file? I can only see the ability to put IP and Port in
> there.
>
> Thanks,
>
> Guy
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home