lundi 4 mai 2020

Rails + Memcachier shows missing key

I am using memcachier in my rails applciation which is running in Heorku, below the gem details

memcachier (0.0.2)

dalli (2.6.2)

Ruby 1.9.3

Rails 3.2.11

Let say I am rendering a file called _credit_account.html.erb and in the file I am using a caching mechanisam to store the user details, code looks like

def credit_account

end

In the partial _credit_account.html.erb

Rails.cache.fetch(
"user_details_of_credit_account_#{account_id}"
) do
UserDetails.for_account(account_id).to_a
end

So in the dashboard of MemCachier I can see the hit for this key

GET OK 5KB user_details_of_credit_account_53625762

But the strange thing is I can see this missed key also for the whole page,

GET Key not found http://sample.app.com/user/credit_account?id=53625762

This looks like I am using the whole page caching but there is no code other than this. Am i missing anything here?

Aucun commentaire:

Enregistrer un commentaire