cache first commit

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

View File

@ -6,7 +6,8 @@ class PagesController < ApplicationController
def index
@item = Page.find_by_name('home')
if @item
if @item && (stale? etag: @item.updated_at)
impressionist(@item)
render_page
else

View File

@ -12,7 +12,7 @@ Orbit::Application.configure do
# Show full error reports and disable caching
config.consider_all_requests_local = false
#config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_controller.perform_caching = true
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false