memcached

will restarting apache clear my memcache contents?

I just wanted to know if memcache is linked to apache or it runs as a separate process. So, will restarting apache clear my memcache contents or not? ...

Django - alert when memcached is down

Is there some ready-made addon that alerts admins about memcached instance being inaccessible from a Django application? I don't mean here monitoring memcached daemon itself, but something that checks if my Django app benefits from caching. My basic idea is to check if cache.get that follow cache.set actually returns something, and if n...

Gem Install memcached-northscale error

Trying to install memcached-northscale and getting a weird error. Any help would be appreciated. $ sudo gem install memcached-northscale Building native extensions. This could take a while... ERROR: Error installing memcached-northscale: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/...

How can I force Rails (2.3.x) MemCacheStore to read a value from the server?

Long story short: I have some controller logic that requests a value from the cache X times, expecting to get a different value on subsequent requests if it has in fact changed on the cache server in between cache requests (this is all within the context of a single HTTP request). However it seems that Rails MemCacheStore wraps itself w...

pagination and memcached in rails

What's the best way to cache a paginated result set with rails and memcached. For example posts controller def index @posts = Rails.cache.fetch('all_posts') do Post.paginate(:conditions => ['xx = ?', yy], :include => [:author], :page => params[:page], :order => 'created_at DESC') end end This obviously doesn't work when the params[:...

Can a Memcached daemon ever free() unused memory, without terminating the process?

I believe that you can't force a running Memcached instance to de-allocate memory, short of terminating that Memcached instance (and freeing all of the memory it held). Does anyone know of a definitive piece of documentation, or even a mailing list or blog posting from a reliable source, that can confirm or deny this impression? As I un...

php memcached error

Every time I try to use the add() function for memcached, I get the following error: A PHP Error was encountered Severity: Warning Message: MemcachePool::add(): The lowest two bytes of the flags array is reserved for pecl/memcache internal use Filename: libraries/memcached_library.php Line Number: 92 What could be wrong? I'm using...

max age with nginx/passenger/memcached/rails2.3.5

I notice that in my production enviornment (where I have memcached implemented) in see a cache-control - max-age header in firebug, anytime I am looking at an index page (posts for example). Cache-Control max-age=315360000 In my dev environment that header looks like following. Cache-Contro private, max-age=0, must-revalidate As...

rails fresh_when/stale? usage

In my post_index action, I generate different kinds of "@posts" like.. def index case params[:listing_type] when "all" @posts = get_all_post_from_memcached when "most_popular" @posts = get_all_most_popular_from_memcached respond_to do |format| format.ht...

my memcached server have to be "flush_all" per about 12 hours ,unless the app would down soon.

my memcached server have to be "flush_all" per about 12 hours ,unless the app would down soon. if i ignore some memcached settings? my app based on java/tomcat i startup memcached by typed "nohup ./memcached -p [port] -m 8192" that all, i' can't found the configure file of my memcached server. i installing memcached by typed ta...

Issue with thinkingsphinx/pagination and mecached

I memcached (with Dalli client) some of my search results like.. def self.city_search city, per_page, page, order Rails.cache.fetch("#{city}_#{page}_#{order}") do Post.search(:include => [:poster, :category],:geo => location_lat_lng_radian(city), :with => {"@geodist" => 0.0..(Constants::PROXIMITY * Con...

What to use instead of memcache

I'm using memcache for caching (obviously) which is great. But I'm also using it as a cross-request/process data store. For instance I have a web chat on one of my pages and I use memcache to store the list of online users in it. Works great but it bothers me that if I have to flush the whole memcache server (for whatever reason) I loose...

can memcache be used only with one server?

i want to know if i can use memcache, but im only using one server, and i heard that memcache has to work with only 2 servers or more? i just want to clarify this? ...

cache-money requires Ruby version >= 1.8.7. any wayout to work with 1.8.6

I am having performance issue in my application I want to use memcache I am using ruby version 1.8.6. Can anyone suggest me best way out. I want something similar to cache-money or any wayout using 1.8.6 I can use cache-money ...

memcached scalability and efficient voting stats

How scalable is memcache in an enviornment where a cache is potentially getting expired every second. In fact, my question is not just about scalability of memcached but about situations where a model is continuously changing and the best way to scale that type of environment. One might say, why cache if the cache is getting expired ever...

MemCache: java.lang.IllegalArgumentException

I repeatedly get this error while trying to cache my objects in a ArrayList to MemCache in google appengine java.lang.IllegalArgumentException: Cannot use as value: '[Id: 24, Version: 1, Id: 25, Version: 1]' The key and value objects are both serializable. I tried to implement Externalizable too but its the same problem. Weirdly one cl...

using microsoft velocity / memcache from classic asp

hey guys can anyone tell me how to read data from cache saved in microsoft velocity from classic asp? if above is not possible, then what if i use memcache instead. then is it possible and worth it to read memcache from classic asp thanks in advance ...

cache_money for Rails 3

I've used various forks (mostly the ngmoco fork) of Nick Kallen's excellent cache_money for several Rails 2.3 based project, but we're now making the leap to Rails 3 which, thanks to the introduction of ActiveRelation, does not work with the popular forks of cache_money. Is there a fork of cache_money, or an equivalent write-through ca...

Porting SQL results into memcached

I have few tables which are accessed frequently by users. The same kind of queries are running again and again which cause extra load on the server. The records do not insert/update frequently, I was thinking to cache the IDs into memcached and then fetch them from database this will reduce the burden of searching/sorting etc. Here is ...

Rack session key too long for memcached

I am running Rails 3 configured to use memcached for session store. I have the following setup: development.rb config.cache_store = :mem_cache_store session_store.rb Foo::Application.config.session_store :mem_cache_store, :key => '_foo_session' I can start the app fine, when I go to any page I get the following error: ArgumentError...