aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-08 23:32:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-08 23:32:11 +0000
commitdf79e135ac10e3570415628d14e4e82c32dde855 (patch)
treed70f116e046851df97913c2b39841783b884be10 /actionpack/lib/action_view
parent48f590a42ec2ed501c44c01cdea8b1aa9163e1d9 (diff)
downloadrails-df79e135ac10e3570415628d14e4e82c32dde855.tar.gz
rails-df79e135ac10e3570415628d14e4e82c32dde855.tar.bz2
rails-df79e135ac10e3570415628d14e4e82c32dde855.zip
Added first stab at page and fragment caching
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/cache_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb
new file mode 100644
index 0000000000..ca5a746c26
--- /dev/null
+++ b/actionpack/lib/action_view/helpers/cache_helper.rb
@@ -0,0 +1,9 @@
+module ActionView
+ module Helpers
+ module CacheHelper
+ def cache(binding, name, key = nil)
+ @controller.cache_fragment(binding, name, key) { yield }
+ end
+ end
+ end
+end