Http/proxy caching with memcached?

You really have 1 viable option if you want to use page caching -- load that number with ajax.

Up vote 0 down vote favorite share g+ share fb share tw.

What's the general best practice to deal with something like this.. ##Post controller def show @post = get_from_memcache end ##show.html. Erb The get_from_memcache return a @post object from a cache that basically doesn't expire, because once a post is created, it's body, category, created at etc remains the same. However, in my view I do call another method favorites_count which collects the posts's favorites count from memcache and this favorite keeps changing.

This is a simplication of course, there are a few fields that do change. Now If I were to implement some sort of http caching then I would need to do a fresh_when or stale? In my controller method (show), which would essentially not render the views and hence the updated favorites count, unless I use a etag that encompassed the favorite count and other dynamic fields, in which case it kinda defeats the purpose because those fields change regularly.

How do I manage this situation? So I can take advantage of a proxy but keep certain dynamic fields in the page updated? One things I can think of is ajax calls to other controller actions to update those fields after page load, but that might ugly.

Any other recommendations? Ruby-on-rails caching memcached reverse-proxy link|improve this question asked Oct 1 '10 at 23:26badnaam621419 78% accept rate.

You really have 1 viable option if you want to use page caching -- load that number with ajax However, you don't need to go through rails stack for that -- just write a Metal, they are very fast.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions