Skip to content

Instantly share code, notes, and snippets.

@digitalpardoe
Created July 16, 2011 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalpardoe/1086788 to your computer and use it in GitHub Desktop.
Save digitalpardoe/1086788 to your computer and use it in GitHub Desktop.
Clearing Out The rFlickr Cache
PhotographyAction.clear_cache
redirect_to :action => 'index'
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers #{RAILS_ROOT}/lib/actions )
class PhotographyAction
def self.clear_cache
ActionController::Base.new.expire_fragment(%r{photography.cache})
end
end
rake photo:cache:clear
namespace :photo do
namespace :cache do
desc "Clear out photography cache"
task :clear => :environment do
PhotographyAction.clear_cache
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment