Matt

I am clearing the Rails cache (not just memcache) but another solution is 
to hook into assets:precompile, like this:

Create a file named lib/tasks/clear_cache.rake with this content:

if Rake::Task.task_defined?("assets:precompile:nondigest")
  Rake::Task["assets:precompile:nondigest"].enhance do
    Rails.cache.clear
  endelse
  Rake::Task["assets:precompile"].enhance do
    # rails 3.1.1 will clear out Rails.application.config if the env vars
    # RAILS_GROUP and RAILS_ENV are not defined. We need to reload the
    # assets environment in this case.
    # Rake::Task["assets:environment"].invoke if 
Rake::Task.task_defined?("assets:environment")
    Rails.cache.clear
  endend


Also posted this on Stack 
Overflow.<http://stackoverflow.com/questions/7732985/clear-memcached-on-heroku-deploy/14524721#14524721>


On Monday, October 10, 2011 1:45:09 AM UTC+1, Matt Di Pasquale wrote:
>
> Is there a configuration setting I can set that will automatically clear 
> the cache for me every time I git push?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to