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.

55 questions
1
vote
2 answers

python-memcached installation failed using pip and conda in Python 3.6

python-memcached library failed to installed in Python 3.6 Commands : pip install python-memcached Trace : Collecting python-memcached Downloading python-memcached-1.58.tar.gz Complete output from command python setup.py egg_info: …
user8557056
1
vote
0 answers

Django memcache expire url

from django.core.cache import cache from django.http import HttpRequest from django.utils.cache import get_cache_key def expire_page(path): request = HttpRequest() request.path = path key = get_cache_key(request) if…
anoop
  • 49
  • 1
  • 3
1
vote
1 answer

django memcache cache miss always

I'm running a memcached service on my windows system and I've configured my dev settings to have the following cache settings: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION':…
Jo Kachikaran
  • 562
  • 1
  • 6
  • 12
1
vote
1 answer

Segmentation fault when use memcached in Django+Apache

I am configuring a cache for a Django project, using the MemcachedCache backend. I have tested it in local and in preproduction server and it works like a charm. But when I deploy it on production server I get multiple errors about segmentation…
Stratford
  • 325
  • 1
  • 2
  • 11
1
vote
0 answers

get() set() memcached listening on UDP using Python

Question: How to get set, memcached listening on UDP only, using Python (any of the production level Python bindings) What I have done/tried so far: Making the memcached listen on UDP only - I specified the OPTIONS in memcached config: OPTIONS="-p…
Nabeel Ahmed
  • 18,328
  • 4
  • 58
  • 63
1
vote
3 answers

'str' does not support the buffer interface with Memcached

I am using django 1.7 with python3.4. I recently installed Memcached and am trying to use it with python-memcached as per site cache. But once I define the default cache backend in the settings.py, my application stops working throwing this…
Rohit
  • 475
  • 1
  • 7
  • 16
1
vote
0 answers

Using multiple Clients to access memcache with consistent key distribution with Ketama

I am having trouble reading from a memcache server using a different Python Client then the one used to write the values to memcache. I have a process that writes to the cache with pylibmc, using the 'ketama' behavior. I have a different service…
emispowder
  • 1,787
  • 19
  • 21
1
vote
1 answer

Werkzeug-0.9.4 and python3_memcached-1.51 doesn't work on Python 3.4

I'm using werkzeug.contrib.cache.MemcachedCache with python3_memcached-1.51 when I try to get\set data I get the following error: memcache.MemcachedKeyTypeError: Key must be str()'s…
artvolk
  • 9,448
  • 11
  • 56
  • 85
1
vote
1 answer

python-memcached can't get, or set 'JAC_SF'

After checking a whole load of things, I've found that for some keys, python-memcached just won't get, or set them on my machine (Mac OSX 10.9, homebrew memcache 1.4.15, pip installed python-memcached 1.53). My first issue was a shot in the dark,…
seaders
  • 3,878
  • 3
  • 40
  • 64
1
vote
3 answers

Test if string is valid key prior to memcache.get()

Is there a function in Google App Engine to test if a string is valid 'string key' prior to calling memcache.get(key) without using db.get() or db.get_by_key_name() first? In my case the key is being passed from the user's get request: obj =…
user1961
  • 1,270
  • 2
  • 17
  • 27
0
votes
1 answer

django and memcached - what is actually being cached?

It could be that I'm just expecting too much from django caching but just in case I'm missing something here it is. I've installed memcached (memcached, libmemcached and python-memcached) and configured it as per this instruction. CACHES = { …
abolotnov
  • 4,282
  • 9
  • 56
  • 88
0
votes
0 answers

Flask Caching - Static file performance

I am currently using Flask for API development. With regards to caching, can I ask what is the best practice to decide on what to actually cache? To give some context, I tried caching an image generated by flask's send_file(,…
Hola
  • 11
  • 5
0
votes
0 answers

Passing data from Python to C# using Memcached

I have a weird problem interfacing C# and Python through Memcached. I have Memcached installed on a server. A C# application would write some data on Memcached using the Enyim.Caching library, then a Python application would read it using…
Sirkous
  • 1
  • 1
0
votes
1 answer

Python: Add compiled object to Memcached

I try to add a compiled object to Memcached that is regularly used. The compiled object does never change. cache.set(eq, compile(eq, '', 'eval'), 365*24*60*60) But get the following error message: Can't pickle < class 'code' >: attribute…
Meilo
  • 3,378
  • 3
  • 28
  • 34
0
votes
1 answer

Python Memcached, connect to Azure VM server

I have installed Memcached on an Azure VM server (Ubuntu). I now need to connect to this from my Python program that runs elsewhere. When they were installed on the same server, this worked: import memcache MEMCACHE_SOCKET_PATH =…
user984003
  • 28,050
  • 64
  • 189
  • 285