aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-06 05:09:01 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-06 05:09:01 +0000
commit358a6693909009556f493f0c29e344af4acc3275 (patch)
tree9bc1c9f7a0110285da99cae66a566b0836c29dd1 /actionpack
parent421045e2ff9e0f2077b4f1f23541f197b3249bd7 (diff)
downloadrails-358a6693909009556f493f0c29e344af4acc3275.tar.gz
rails-358a6693909009556f493f0c29e344af4acc3275.tar.bz2
rails-358a6693909009556f493f0c29e344af4acc3275.zip
Added better error handling for regexp caching expiration
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1288 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG6
-rw-r--r--actionpack/lib/action_controller/caching.rb8
2 files changed, 12 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 5434e4ea3d..1630a26a2b 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,10 +1,14 @@
*SVN*
+* Added better error handling for regexp caching expiration
+
+* Fixed handling of requests coming from unknown HTTP methods not to kill the server
+
* Added that both AssetHelper#stylesheet_link_tag and AssetHelper#javascript_include_tag now accept an option hash as the last parameter, so you can do stuff like: stylesheet_link_tag "style", :media => "all"
* Added FormTagHelper#image_submit_tag for making submit buttons that uses images
-* Added the option of specifying a RAILS_ASSET_HOST that will then be used by all the asset helpers. This enables you to easily offload static content like javascripts and images to a separate server tuned just for that.
+* Added ActionController::Base.asset_host that will then be used by all the asset helpers. This enables you to easily offload static content like javascripts and images to a separate server tuned just for that.
* Fixed action/fragment caching using the filestore when a directory and a file wanted to to use the same name. Now there's a .cache prefix that sidesteps the conflict #1188 [imbcmdth@hotmail.com]
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index 28618e2427..7749b07815 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -375,7 +375,13 @@ module ActionController #:nodoc:
def delete_matched(matcher, options) #:nodoc:
search_dir(@cache_path) do |f|
- File.delete(f) rescue nil if f =~ matcher
+ if f =~ matcher
+ begin
+ File.delete(f)
+ rescue Object => e
+ Base.logger.info "Couldn't expire cache: #{f} (#{e.message})" unless Base.logger.nil?
+ end
+ end
end
end