Expiring cached pages on server startup

I added the code below to my environment.rb file in order to expire my
statically cached pages upon server startup.

#Expire static files that may be cached
[‘datagrid/get_parameters.html’].each do |file|
File.delete("#{RAILS_ROOT}/public/#{file}")
end

Are there better schemes to do this out there? This will be executed
every time I fire up a new Mongrel process, correct?

Thanks,
Wes

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs