WebFaction
Community site: login faq
0
1

Hi,

I have done as the tutorial in the docs says and setup memcached for my site. The file is located in my home folder ~/memcached.sock

However its size is zero. Is it normal? How can I check that it works. I am still in dev mode so I can't test it with many users.

asked 10 May '12, 11:49

xpanta
623344
accept rate: 0%


memcached.sock is a UNIX socket file - it doesn't store any information, it simply acts as a conduit for interprocess communication. It is normal for sockets to have a size of zero bytes.

If you want to inspect the status and contents of your memcached cache, then have a look at the tips here: How to communicate with memcached socket via shell?

Hope that helps!

permanent link

answered 10 May '12, 11:55

seanf
12.2k42136
accept rate: 37%

thanks for your answer. I tried both ways (nc and the python shell) described I get {} as an response.

Why could that be?

(11 May '12, 00:04) xpanta

Test Django caching by invoking 'python manage.py shell' and than attempting to use it at a low level the official docs have some good examples. This should give you a better idea of why its failing.

(11 May '12, 03:04) johns

thanks. it fails. But I don't know why. I think I will open a ticket

from django.core.cache import cache

cache.set('my_key', 'hello, world', 30)

cache.get('my_key')

(12 May '12, 02:39) xpanta
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:

×910
×34

question asked: 10 May '12, 11:49

question was seen: 2,311 times

last updated: 12 May '12, 02:39

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