OSDN Git Service

Regular updates
[twpd/master.git] / rails-features.md
diff --git a/rails-features.md b/rails-features.md
new file mode 100644 (file)
index 0000000..4a69902
--- /dev/null
@@ -0,0 +1,14 @@
+---
+title: Rails features
+category: Rails
+---
+
+### [Page caching](https://github.com/rails/actionpack-page_caching)
+
+    class WeblogController < ActionController::Base
+      caches_page :show, :new
+    end
+
+This will generate cache files such as `weblog/show/5.html` and 
+`weblog/new.html`, which match the URLs used that would normally trigger dynamic 
+page generation