Commit 57d1826d2a06f1cb7aaa0b9c151bc930b1087a24

cache rendered blobs

Commit diff

.gitignore

 
11*/.DS_Store
22.DS_Store
3coverage/*
3coverage/*
4public/cache/*
toggle raw diff

app/views/browse/blob.html.erb

 
1515 <small>(<%= link_to "raw blob data", raw_blob_path(@blob.sha, current_path) -%>)</small>
1616</h1>
1717
18<%= render_highlighted(@blob.contents, current_path.last || "") -%>
18<% cache do -%>
19 <%= render_highlighted(@blob.contents, current_path.last || "") -%>
20<% end -%>
toggle raw diff

config/environments/production.rb

 
1414config.action_controller.consider_all_requests_local = false
1515config.action_controller.perform_caching = true
1616
17cache_dir = File.expand_path(File.join(RAILS_ROOT, 'public', 'cache'))
18config.action_controller.page_cache_directory = cache_dir
19config.action_controller.fragment_cache_store = :file_store, File.join(cache_dir, "fragments")
20
1721# Enable serving of images, stylesheets, and javascripts from an asset server
1822# config.action_controller.asset_host = "http://assets.example.com"
1923
toggle raw diff