Navigation Menu

Skip to content

Commit

Permalink
fixed caching, removed action_cache plugin and now using Rails 2.1 de…
Browse files Browse the repository at this point in the history
…fault caching
  • Loading branch information
Bruno Bornsztein committed Jun 12, 2008
1 parent 8cfe009 commit f724aa1
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 694 deletions.
14 changes: 4 additions & 10 deletions app/controllers/base_controller.rb
Expand Up @@ -6,16 +6,10 @@ class BaseController < ApplicationController
include AuthenticatedSystem
before_filter :login_from_cookie

caches_action :site_index, :footer_content

def cache_action?(action_name)
!logged_in? && controller_name.eql?('base') && params[:format].blank?
end
def action_fragment_key(options)
url = url_for(options).split('://').last
url = (url =~ /^.*\/$/) ? "#{url}index" : url
url
end
caches_action :site_index, :footer_content, :if => Proc.new{|c| c.cache_action? }
def cache_action?
!logged_in? && controller_name.eql?('base') && params[:format].blank?
end

if AppConfig.closed_beta_mode
before_filter :beta_login_required, :except => [:teaser]
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/posts_controller.rb
Expand Up @@ -4,8 +4,8 @@ class PostsController < BaseController
uses_tiny_mce(:options => AppConfig.simple_mce_options, :only => [:show])

cache_sweeper :post_sweeper, :only => [:create, :update, :destroy]
caches_action :show
def cache_action?(action_name)
caches_action :show, :if => Proc.new{|c| c.cache_action? }
def cache_action?
!logged_in? && controller_name.eql?('posts')
end

Expand Down
5 changes: 1 addition & 4 deletions app/controllers/sitemap_controller.rb
@@ -1,9 +1,6 @@
class SitemapController < BaseController
layout false
caches_action :index
def cache_action?(action_name)
true
end
caches_action :index

def index
@users = User.find(:all, :select => 'id, login, updated_at, login_slug', :conditions => "activated_at IS NOT NULL")
Expand Down
3 changes: 0 additions & 3 deletions assets/stylesheets/screen.css
Expand Up @@ -916,9 +916,6 @@ div.progressBar div.background {
margin: 0 0 0; }


.poll_excerpt {
padding-left: 20px;
background: url(/images/icons/poll.png) no-repeat left; }
table.poll {
width: 100%;
margin-bottom: 3em; }
Expand Down
57 changes: 0 additions & 57 deletions engine_plugins/action_cache/CHANGELOG

This file was deleted.

20 changes: 0 additions & 20 deletions engine_plugins/action_cache/MIT-LICENSE

This file was deleted.

174 changes: 0 additions & 174 deletions engine_plugins/action_cache/README

This file was deleted.

7 changes: 0 additions & 7 deletions engine_plugins/action_cache/about.yml

This file was deleted.

1 change: 0 additions & 1 deletion engine_plugins/action_cache/init.rb

This file was deleted.

0 comments on commit f724aa1

Please sign in to comment.