Hey guys,
I'm putting together my next Scaling Rails envycast (which may get
released for free), and I'm running into what appears to be a bug with
Rails 2.2.2 when ActionCaching. I looked for a bug report which
addresses this, but I have been unable to find one, so I thought I'd
share on here. Here's the gist:
class PostsController < ApplicationController
caches_action :show
end
and when it's hit I see this in the log:
-
Cached fragment hit: views/localhost:3000/posts/show/1 (0.1ms)
-
then I run to expire
expire_action :controller => :posts, :action => :show, :id => 1
and when it runs I see in the log:
-
Expired fragment: views/localhost:3000/posts/1 (0.2ms)
-
Notice the key's don't match, so action caching is effectively
broken in 2.2.2? In edge it seems to be fixed and
"caches_action :show" gives the proper key of "views/localhost:3000/
posts/1".
I tried to track down the offending code, but ran out of time. Is
someone aware of this issue?
-Gregg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---