#117: expire cached fragments from the console

Solved!
I'm always forgetting how to do this

ApplicationController.new

2
ApplicationController.new.expire_fragment("your_cache_key")

or

Rails.cache.delete("your_cache_key")

Keep in mind, though, that your controller instance won't have url_for at its disposal, so you will probably have to construct your cache key manually if you usually use a hash to initialize it. Check out the source for fragment_cache_key, or just use the pattern

views/www.yoursite.com/whatever/url_for/would?generate=true

Think you've got a better solution? Help 148c663fd665c53518538e093ce3c2ab_small kueda out by posting your solution