I managed to get everything loaded from memcached, except use current logged in user.
if you use acts_as_authenticated plugin, every time you you do a "current_user" call, it will read from DB: (User Load (0.005747) SELECT * FROM users WHERE (users.`id` = 3921) LIMIT 1)
instead I save the user in memcached (==> Got User:3921 from cache. (0.00036)) I had to change lib/authenticated_system.rb line 9 def current_user # Without Memcached #@current_user ||= (session[:user] && User.find_by_id(session[:user])) || :false # With Memcached @current_user ||= (session[:user] && User.get_cache(session[:user])) || :false end ` I alse started to use Partial Cache a lot, example in list.rhtml <% for property in @properties %> <% cache property.permalink do %> <%= render :partial => "each_property", :locals=> {:property => property} %> <% end %> <% end %>
lastly, i'm about to start using ESI