Forum: Ruby on Rails Cleaning Action Cache not working for show action

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jochen K. (Guest)
on 2009-03-12 18:31
(Received via mailing list)

I realized (in development environment with caching activated) that
cleaning the action cache for the show action is not working
The caching itself works fine - but once I try to clean the cache via
the corresponding sweeper, the show action fragment does not get

Here is the relevant sweeper method:
def clear_clientcontact_cache(clientcontact)
    expire_action(:controller => 'clientcontacts', :action =>
'show', :id =>

Here is the relevant logfile output:
[Cached fragment hit: views/localhost:3000/clientcontacts/show/1]
#this is the cached fragment
Expired fragment: views/localhost:3000/clientcontacts/1 (0.0ms)

The problem seems to be that the expired fragment does not coincidence
with the fragment the show action looks for: "views/localhost:3000/
clientcontacts/show/1" (--> "show" appears in the path) meanwhile the
expired fragment has no "show" in the path.

Anyone knows why that happens and how I can resolve it?

Thanks for your help!

This topic is locked and can not be replied to.