cache first commit

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-07-12 11:47:24 +08:00
1 parent 85d6bbe1c9
commit 0e65e379b0
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -3,10 +3,11 @@ class PagesController < ApplicationController
include ApplicationHelper
before_filter :get_item, :only => [:index_from_link, :show_from_link]
def index
@item = Page.find_by_name('home')
if @item
if @item && (stale? etag: @item.updated_at)
impressionist(@item)
render_page
else