Just getting starting using memcached with a rails app
I have the following fragment:
<% cache("home_main", :expires_in => 1.minute) do %>
and would like to query the value via the Rails console but:
=> nil
1.9.1 :012 > Rails.cache.read('home_main')
=> nil
1.9.1 :013 > Rails.cache.fetch('home_main')
=> nil
1.9.1 :014 >
How would I query to get that fragment back? Or how would I see what the current cache keys are?
Also, how do I clear the cache?
From Rails.cache.stats
conn_yields: '0'
bytes: '409071'
curr_items: '23'
total_items: '157'
evictions: '0'
reclaimed: '0'
=> nil
>Rails.cache.clear
....
>Rails.cache.stats
...
bytes: '409071'
curr_items: '23'
total_items: '157'
evictions: '0'
reclaimed: '0'
=> nil
1.9.1 :017 >
How would I truly clear memcached?
thx