How do I expire a view cached fragment from console?
ActionController::Base.new.expire_fragment(key)
Cache fragment entries are created with a slightly different key than what you access with Rails.cache.
Use expire_fragment
instead (you can send it to a controller): http://api.rubyonrails.org/classes/ActionController/Caching/Fragments.html#M000438
Rails.cache.delete "views/site_search_form"