WebFaction
Community site: login faq

I have a memcached daemon set up with Webfaction, and it works great.

When i want to reset the cache, I kill the process as described in the webfaction memecached guide:

http://docs.webfaction.com/software/memcached.html#memcached-setting-up

I would like to use memcached with multiple sites, but am not sure what the best solution is for that. Obviously if it's all stored within the same daemon, killing that process would affect all sites. On the other hand, i'm not sure sporing multiple daemons would be particularly efficient.

I could: a) Write some logic to prevent conflicts and enable easy reset of site specific cache (e.g. store all site cache within a variable identifying that site) b) Use a different memcached daemon for each site (is this even possible with the way memcached is set up on webfaction?) c) ?

asked 08 Nov '11, 05:51

alz
111
accept rate: 0%


Hi,

You should be able to run multiple instances of memcached for each of your Django sites that you want to use it with. Writing some logic to prevent conflicts might also be possible, although I haven't personally seen this done before.

permanent link

answered 08 Nov '11, 05:59

todork
1.2k5
accept rate: 34%

Hi, Old question, but I think settings KEY_PREFIX is the way to achieve having multiple sites use the same memcached instance: https://docs.djangoproject.com/en/dev/topics/cache/?from=olddocs#cache-key-prefixing

permanent link

answered 30 Nov '12, 11:22

fonso
11
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×113
×34
×17

question asked: 08 Nov '11, 05:51

question was seen: 5,916 times

last updated: 30 Nov '12, 11:22

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM