memcached

In Django/python, how do I set the memcache to infinite time?

cache.set(key, value, 9999999) But this is not infinite time... ...

Using memcached/APC for session storage?

Hi everybody, I had some thoughts back ago about using memcached for session storage, but came to the conclusion that it wouldn't be sufficient in the event of one or more of the servers in the memcached pool were about to go down. A hybrid version is to save the main database (mySQL) from load caused by reads would be to work out a f...

memcache won't store key/value because the value is too big.

cache.set(key, Biglist, 3600) print cache.get(key) When my "Biglist" is a huge list of lots of content, it doesn't seem to store. But when I change it to small text like "abc", it stores. What do I have to configure so that I can set my memcache to accept unlimited size of key/value? ...

Database design advice needed.

Hi all, I'm a lone developer for a telecoms company, and am after some database design advice from anyone with a bit of time to answer. I am inserting into one table ~2 million rows each day, these tables then get archived and compressed on a monthly basis. Each monthly table contains ~15,000,000 rows. Although this is increasing month...

how to delete memcached data with "filter" keys ?

Hi, I just want to delete cached data, but I have many keys, for example: user_54_books user_54_movies user_54_comments user_54_foobar I can write $cache->delete('user_54_books'); but I have to do it with all "user_ID_objects", can I say to memcache, something like delete->('user_54_*'); ? how? thanks :) ...

Are there any memcached browser utilities?

I'd like to be able to see what is stored on a memcached server, with the ability to add/remove values at will for development purposes. Are there any tools to help with this? I'd really like a GUI, I just can't find one. ...

Memcached - how to deal with adding/deploying servers

Hi everybody, How do you handle replacing/adding/removing memcached nodes in your production applications? I will have a number of applications that are cloned and customized due to each customers need running on one and same webserver, so i'll guess that there will be a day when some of the nodes will be changed. Here's how memcached ...

Can memcached make full use of multi-core?

Is memcached capable of making full use of multi-core? Or is there any way tuning this? ...

PHP memcached: getDelayed & getMulti - how to use?

Hi everybody, I have thought a bit recently about how to use getDelayed and getMulti in a PHP application, and their difference. From reading the documentation about getDelayed: "The method does not wait for response and returns right away. When you are ready to collect the items, call either Memcached::fetch or Memcached:...

Rails, Passenger and Memcached: Unable to find server during initialization

Hello, I hope all is well. I am hoping someone can help me with a problem that I am certain is user error? The configuration details below work in all my other environments including integration, development and qa. However, the production servers give the following error: unable to find server during initialization. When I telnet to...

Persistent memcached connection with Apache and CodeIgniter

I have a CodeIgniter project. I want to use Memcache, but I don't want to create a new connection every time index.php is loaded (which is on every page load). How can I set up Apache / CodeIgniter so that I always have access to a memcache connection, without having to re-establish it all the time? ...

I want to cache an entire list...but it won't fit in Memcache...

Because this list is like 2MB big...and memcache max memory is only 1MB. Is there a simple key/value alternative, just like memcache, except it can do bigger size? ...

How do I handle Memcached::ServerIsMarkedDead error with Rails?

Hi, In my Rails app, I changed my model's find method to search into the cache before looking into the database, but I sometime get this error: Memcached::ServerIsMarkedDead While waiting for Memcached server to be up again, how should I handle this error and force Rails to search into the database? Thank you, Kevin ...

Observer not clearing cache in Rails 2.3.2 - please help.

Hi, We are using Rails 2.3.2, Ruby 1.8 & memcache. In my Posts controller I have: cache_sweeper Company::Caching::Sweepers::PostSweeper, :only => [:save_post] I have created the following module: module Company module Caching module Sweepers class PostSweeper < ActionController::Caching::Sweeper observe Post ...

Is there a way to deserialize an object into "$this"?

I'm writing a class to handle a memcached object. The idea was to create abstract class Cachable and all the cachable objects (such as User, Post, etc) would be subclasses of said class. The class offers some method such as Load() which calls the abstract function LoadFromDB() if the object is not cached, functions to refresh/invalidate...

Personal Cache vs Memcache?

I have a personal caching class, which can be seen here ( based off WordPress' ): http://pastie.org/988427 I recently learned about memcache and it said to memcache EVERYTHING: http://highscalability.com/blog/2010/5/17/7-lessons-learned-while-building-reddit-to-270-million-page.html My first thought was just to keep my class with the c...

coherence/memcache/AppFabric for pub/sub

Looking for advice/pro's/con's on using the memory cache servers for pub/sub esp wrt a high-throughput system ( 1000's of updates/sec ) Coherence seems to have pub/sub as a use-case, not sure about the others Would love to get some real-world input ! ...

NoMethodError using Memcached Sinatra-style

I've just installed Memcached on my Mac and updated my Sinatra app configuration as described in Heroku's documentation, but I'm getting a NoMethodError when trying to use the hash-based syntax they specify: >> CACHE['color'] = 'blue' >> CACHE['color'] Using explicit get and set methods as below seems to work fine. >> CACHE.set('colo...

Using Django's memcache API on Dynamically created models.

So I have a function which creates a dynamic model. I accomplish this in a way very similar to AuditTrail (see django wiki). Sample of code is here: https://gist.github.com/0212845ae00891efe555 Is there any way I can make a dynamically-generated class pickle-able? Ideally something thats not a crazy monkeypatch/hack? ...

Memcache - How extend expiration of value with keeping consistency of value?

See this simple piece of code in PHP: //Documentation: //memcache_set ( string $key , mixed $var [, int $flag [, int $expire ]] ) //memcache_increment ( string $key [, int $value = 1 ] ) //part 1 memcache_set ( 'id' , 1 , 0 , 60 ); //part 2 $id = memcache_increment ( 'id' , 1 ); And now imagine that the incrementing "part 2" is call...