From eb7964865a5083615503896f7793051491eae23d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 2 Nov 2006 08:48:44 +0000 Subject: Document that expire_fragment with regexp arg fails on memcached and other caches which don't support iteration over all keys. Closes #6291. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/caching.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index a91a2198a6..177f72d136 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -363,7 +363,12 @@ module ActionController #:nodoc: # Name can take one of three forms: # * String: This would normally take the form of a path like "pages/45/notes" # * Hash: Is treated as an implicit call to url_for, like { :controller => "pages", :action => "notes", :id => 45 } - # * Regexp: Will destroy all the matched fragments, example: %r{pages/\d*/notes} Ensure you do not specify start and finish in the regex (^$) because the actual filename matched looks like ./cache/filename/path.cache + # * Regexp: Will destroy all the matched fragments, example: + # %r{pages/\d*/notes} + # Ensure you do not specify start and finish in the regex (^$) because + # the actual filename matched looks like ./cache/filename/path.cache + # Regexp expiration is not supported on caches which can't iterate over + # all keys, such as memcached. def expire_fragment(name, options = nil) return unless perform_caching -- cgit v1.2.3