Created
October 25, 2012 20:30
-
-
Save nthj/3955195 to your computer and use it in GitHub Desktop.
Nuke your cache on deployment in Rails 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Throw this into config/initializers/cache.rb | |
if ARGV.any? { |a| %w(s server thin).include?(a) } | |
puts "=> Initializing environment, clearing cache" | |
Rails.cache.clear | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment