We're running a Rails 3.0.7 app with Passenger standalone + nginx and with ruby 1.9.2-p290, and we're seeing the strangest thing happen: After deploying some updates to a mailer template, new mails coming from the app sometimes have the updates applied, and sometimes the old template is being used.
I can't find anything about cached ActiomMailer templates online, and running rake tmp:cache:clear
does not address the issue either, fwiw.
Has anyone ever experienced such a thing? Is there a definitive solution for this problem?
thanks,
Jacob
View caching in Ruby on Rails is taking the HTML that a view generates and storing it for later.
Rails (as of 2.1) provides different stores for the cached data created by action and fragment caches. Page caches are always stored on disk. Rails 2.1 and above provide ActiveSupport::Cache::Store which can be used to cache strings.
Caching means to store content generated during the request-response cycle and to reuse it when responding to similar requests. Caching is often the most effective way to boost an application's performance.
I've run into similar situations in our application, and we use Resque.
If I'm changing anything regarding mailers (which the Resque workers handle), I need to restart the workers.
Kill the workers and respawn them, it sounds like some of them might have the old environment loaded and others do not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With