Questions tagged [python-memcached]

Python-memcached is a Python based API (implemented in 100% python) for communicating with the memcached distributed memory object cache daemon.

Python-memcached is a Python based API (implemented in 100% python) for communicating with the memcached distributed memory object cache daemon.

Code is based off the code written by Evan Martin of Danga. Sean Reifschneider of tummy.com has taken over maintenance of the code.

54 questions
10
votes
4 answers

Python3: Looking for alternatives to gevent and pylibmc/python-memcached

So, I have decided to write my next project with python3, why? Due to the plan for Ubuntu to gradually drop all Python2 support within the next year and only support Python3. (Starting with Ubuntu 13.04) gevent and the memcached modules aren't…
Nadav
  • 168
  • 2
  • 10
10
votes
3 answers

How do I delete a cached template fragment in Django?

Previously, I had set up a cached chunk of HTML in my Django template as follows. {% load cache %} {% cache 10000 courseTable %} {% endcache %} Now, I have updated this cached content and want to refresh it. I…
dangerChihuahua007
  • 18,433
  • 28
  • 104
  • 190
9
votes
3 answers

Python and mechanize login script

Hi fellow programmers! I am trying to write a script to login into my universities "food balance" page using python and the mechanize module... This is the page I am trying to log into: http://www.wcu.edu/11407.asp The website has the following form…
Perun
  • 103
  • 1
  • 2
  • 7
6
votes
1 answer

a bytes-like object is required, not 'str' - error

I have python-memcached (1.57) and django-celery (3.1.17), celery (3.1.20) and python 3.5. I always get the error below when i try to implement…
qj2003
  • 117
  • 1
  • 10
6
votes
2 answers

Increase Memcached Max Item Size

I'm trying to increase the max item size in my memcached installation. So far, I have tried editing /etc/memcached.conf adding the line -I 3M followed by restarting memcached. This WAS working for me, but seems to have reverted overnight. The…
apardes
  • 3,552
  • 6
  • 34
  • 59
5
votes
2 answers

memcache on django is not working

I have a race condition in Celery. Inspired by this - http://ask.github.io/celery/cookbook/tasks.html#ensuring-a-task-is-only-executed-one-at-a-time I decided to use memcache to add locks to my tasks. These are the changes I…
suprita shankar
  • 1,274
  • 1
  • 12
  • 32
4
votes
1 answer

How to install pylibmc (python client for memcached)?

I'm trying to install pylibmc according to the instructions here: http://sendapatch.se/projects/pylibmc/install.html I downloaded the latest version of pylibmc from here: http://pypi.python.org/pypi/pylibmc I downloaded libmemcached (0.51) from…
Atif
  • 926
  • 1
  • 6
  • 18
4
votes
3 answers

how do I return all memcached values in Google App Engine?

I want to use all the data in my python app engine memcache. I do not know the keys in advance. How do I go about getting all data?
rutherford
  • 9,098
  • 13
  • 47
  • 70
4
votes
6 answers

Does python-memcached support consistent hashing & binary protocol?

Python-memcached is the official supported memcached driver for Django. Does it support Consistent hashing Binary protocol If it does, how do I use those features within Django? I couldn't find any documentation.
Continuation
  • 11,664
  • 19
  • 77
  • 102
3
votes
1 answer

How can explicitly reset a template fragment cache in Django?

I am using Memcache for my Django application. In Django, developers can use template fragment caching to only cache a section of a template. https://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching I was wondering if there is a…
dangerChihuahua007
  • 18,433
  • 28
  • 104
  • 190
3
votes
2 answers

Python memcached set_multi storing issue

I have discovered an issue when trying to store a lot of keys using python-memcached. Here is what I'm doing: import memcache # This dict has a 2270 entries that is generated on production server v = eval(open("/home/dragoon/output").read()) a =…
dragoon
  • 4,888
  • 5
  • 32
  • 52
3
votes
3 answers

Django / Memcached error: The request's session was deleted before the request completed

Here is the full error: The request's session was deleted before the request completed. The user may have logged out in a concurrent request, for example. I am using python-memcached with my sessions using my cache. Every few days I get one of these…
kagronick
  • 1,940
  • 1
  • 15
  • 25
3
votes
1 answer

django cache.set() Type error

I'm using django 1.9 and Python 3. I've installed python-memcached and when I try to cache.set("foo", "bar") I get this error: TypeError: a bytes-like object is required, not 'str' Any idea why this is happening? I made sure to set the middleware…
Sebastian Olsen
  • 7,528
  • 8
  • 35
  • 78
2
votes
1 answer

Any Python memcached client that batches and parallelizes multiple get to multiple servers?

Very often I need to get the values for a long list of N keys such as [1267, 56578, ... , 9800] Those values are stored on M different Memcached servers. I don't want to send out a get() request, wait for a response, and then repeat N times. Is…
Continuation
  • 11,664
  • 19
  • 77
  • 102
2
votes
1 answer

Connect to python-memcached using memcached.sock path

How do I connect to Python-memcached using the path to memcached.sock? (Python 2.7) Memcached comes pre-installed on my host (Webfaction). I have started it and verified that it is running. I also verified that memcached.sock is in my home…
user984003
  • 23,717
  • 51
  • 158
  • 250
1
2 3 4