8
5

I have OSQA up and running with the file cache backend enabled, and it’s a little sluggish in places. I’d like to use the memcached caching backend, but I have been unable to find any instructions on how to configure this in OSQA.

What should CACHE_BACKEND be set to in settings_local.py to use memcached? Are there any other steps to the configuration?

asked 21 Sep '10, 23:22

Kevin%20Yank's gravatar image

Kevin Yank
436111824
accept rate: 28%


First thing is having memcached up and running. Then you need to install the pyhton memcached bindings, like python-memcached. Then set the CACHE_BACKEND like this:

CACHE_BACKEND = 'memcached://<server-address>:<port>/'

where server address is usually localhost or 127.0.0.1, and the port 11211. But it can be anything else. Restart and enjoy :)

link

answered 22 Sep '10, 06:21

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

1

Works great! The app is nice and speedy now.

(23 Sep '10, 22:17) Kevin Yank
2

how much faster does it run? Anyone looked into the code to see what is being cached?

(04 Oct '10, 13:55) Valentino Lee
1

For me the slowest part of the SQL involved forum_node_tags table. Now they are gone to memcached. Page load times are now < 1 sec with 200K+ questions a decrease from ~30sec for a page.

(07 Sep '11, 06:38) kerem
1

Awesome. My site is super fast now with everything loads in under a sec. This is way better than the default caching. Installing memcached was easy as well.

(12 Oct '11, 16:03) Greenbrick

The next major low hanging fruit are template loader caching and connection pooling. See:



<p><a href="http://meta.osqa.net/questions/11381/is-osqa-cpu-bound/11544">http://meta.osqa.net/questions/11381/is-osqa-cpu-bound/11544</a></p>
(23 Mar, 19:17) Danny Thomas
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

Tags:

×15
×12
×10
×6
×5

Asked: 21 Sep '10, 23:22

Seen: 1,312 times

Last updated: 23 Mar, 19:17

powered by OSQA