Fixed caching bug with category 'list' and 'recently_revised' views.
Re-enabled filesystem caching.
This commit is contained in:
parent
edf335060a
commit
144540a761
|
@ -8,8 +8,7 @@ require 'string_utils'
|
|||
class WikiController < ApplicationController
|
||||
|
||||
before_filter :load_page
|
||||
caches_action :show, :published, :authors, :tex, :s5, :print
|
||||
# caches_action :show, :published, :authors, :tex, :s5, :print, :recently_revised, :list
|
||||
caches_action :show, :published, :authors, :tex, :s5, :print, :recently_revised, :list
|
||||
cache_sweeper :revision_sweeper
|
||||
|
||||
layout 'default', :except => [:rss_feed, :rss_with_content, :rss_with_headlines, :tex, :pdf, :s5, :export_tex, :export_html]
|
||||
|
|
|
@ -64,7 +64,7 @@ module ApplicationHelper
|
|||
else
|
||||
"<div id=\"categories\">\n" +
|
||||
'<strong>Categories</strong>:' +
|
||||
'[' + link_to_unless_current('Any', :web => @web.address, :action => @action_name) + "]\n" +
|
||||
'[' + link_to_unless_current('Any', :web => @web.address, :action => @action_name, :category => nil) + "]\n" +
|
||||
@categories.map { |c|
|
||||
link_to_unless_current(c, :web => @web.address, :action => @action_name, :category => c)
|
||||
}.join(', ') + "\n" +
|
||||
|
|
|
@ -11,7 +11,7 @@ Rails::Initializer.run do |config|
|
|||
|
||||
# Enable page/fragment caching by setting a file-based store
|
||||
# (remember to create the caching directory and make it readable to the application)
|
||||
#config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
|
||||
config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
|
||||
|
||||
# Activate observers that should always be running
|
||||
config.active_record.observers = :page_observer
|
||||
|
|
|
@ -22,10 +22,8 @@ ActionController::Routing::Routes.draw do |map|
|
|||
connect_to_web map, ':web/web_list', :controller => 'wiki', :action => 'web_list'
|
||||
connect_to_web map, ':web/show/diff/:id', :controller => 'wiki', :action => 'show', :mode => 'diff'
|
||||
connect_to_web map, ':web/revision/diff/:id', :controller => 'wiki', :action => 'revision', :mode => 'diff'
|
||||
connect_to_web map, ':web/list', :controller => 'wiki', :action => 'list'
|
||||
connect_to_web map, ':web/list/:category', :controller => 'wiki', :action => 'list'
|
||||
connect_to_web map, ':web/recently_revised', :controller => 'wiki', :action => 'recently_revised'
|
||||
connect_to_web map, ':web/recently_revised/:category', :controller => 'wiki', :action => 'recently_revised'
|
||||
connect_to_web map, ':web/list/:category', :controller => 'wiki', :action => 'list', :requirements => { :category => /.*/}, :category => nil
|
||||
connect_to_web map, ':web/recently_revised/:category', :controller => 'wiki', :action => 'recently_revised', :requirements => { :category => /.*/}, :category => nil
|
||||
connect_to_web map, ':web/:action/:id', :controller => 'wiki'
|
||||
connect_to_web map, ':web/:action', :controller => 'wiki'
|
||||
connect_to_web map, ':web', :controller => 'wiki', :action => 'index'
|
||||
|
|
Loading…
Reference in a new issue