Permalink
Browse files

Improve expire_fragment documentation. Closes #2966.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 5d785db commit a0293c80f0ad06de4b80f50cd47868ff50aa7590 @jeremy jeremy committed Nov 21, 2005
Showing with 4 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +2 −1 actionpack/lib/action_controller/caching.rb
@@ -1,5 +1,7 @@
*SVN*
+* Improve expire_fragment documentation. #2966 [court3nay@gmail.com]
+
* Correct docs for automatic layout assignment. #2610. [Charles M. Gerungan]
* Always create new AR sessions rather than trying too hard to avoid database traffic. #2731 [Jeremy Kemper]
@@ -306,7 +306,8 @@ def read_fragment(name, options = nil)
# 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}
+ # * Regexp: Will destroy all the matched fragments, example: %r{pages/\d*/notes} Ensure you don't use specify start and finish in your regex (^$) because the actual filename matched will look like ./cache/filename/path.cache
+ #
def expire_fragment(name, options = nil)
return unless perform_caching

0 comments on commit a0293c8

Please sign in to comment.