Fixed caching bug with category 'list' and 'recently_revised' views.

Re-enabled filesystem caching.
This commit is contained in:
Jacques Distler 2007-03-10 00:18:18 -06:00
parent edf335060a
commit 144540a761
4 changed files with 5 additions and 8 deletions

View file

@ -8,8 +8,7 @@ require 'string_utils'
class WikiController < ApplicationController class WikiController < ApplicationController
before_filter :load_page 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 cache_sweeper :revision_sweeper
layout 'default', :except => [:rss_feed, :rss_with_content, :rss_with_headlines, :tex, :pdf, :s5, :export_tex, :export_html] layout 'default', :except => [:rss_feed, :rss_with_content, :rss_with_headlines, :tex, :pdf, :s5, :export_tex, :export_html]

View file

@ -64,7 +64,7 @@ module ApplicationHelper
else else
"<div id=\"categories\">\n" + "<div id=\"categories\">\n" +
'<strong>Categories</strong>:' + '<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| @categories.map { |c|
link_to_unless_current(c, :web => @web.address, :action => @action_name, :category => c) link_to_unless_current(c, :web => @web.address, :action => @action_name, :category => c)
}.join(', ') + "\n" + }.join(', ') + "\n" +

View file

@ -11,7 +11,7 @@ Rails::Initializer.run do |config|
# Enable page/fragment caching by setting a file-based store # Enable page/fragment caching by setting a file-based store
# (remember to create the caching directory and make it readable to the application) # (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 # Activate observers that should always be running
config.active_record.observers = :page_observer config.active_record.observers = :page_observer

View file

@ -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/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/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/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', :requirements => { :category => /.*/}, :category => nil
connect_to_web map, ':web/list/:category', :controller => 'wiki', :action => 'list' connect_to_web map, ':web/recently_revised/:category', :controller => 'wiki', :action => 'recently_revised', :requirements => { :category => /.*/}, :category => nil
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/:action/:id', :controller => 'wiki' connect_to_web map, ':web/:action/:id', :controller => 'wiki'
connect_to_web map, ':web/:action', :controller => 'wiki' connect_to_web map, ':web/:action', :controller => 'wiki'
connect_to_web map, ':web', :controller => 'wiki', :action => 'index' connect_to_web map, ':web', :controller => 'wiki', :action => 'index'