Permalink
Browse files

moving back : dalli doesn't support regexp requests

  • Loading branch information...
mcansky
mcansky committed Feb 16, 2011
1 parent f23360f commit 143f26c93f80488f7deb8de55dacf8c19ae79c67
@@ -2,19 +2,19 @@ class BookmarkSweeper < ActionController::Caching::Sweeper
observe Bookmark
# If our sweeper detects that a Bookmark was created call this
def after_create(bookmark)
- expire_fragment(%r{.*post.*})
+ #expire_fragment(%r{.*post.*})
expire_cache_for(bookmark)
end
# If our sweeper detects that a Bookmark was updated call this
def after_update(bookmark)
- expire_fragment(%r{.*post.*})
+ #expire_fragment(%r{.*post.*})
expire_cache_for(bookmark)
end
# If our sweeper detects that a Bookmark was deleted call this
def after_destroy(bookmark)
- expire_fragment(%r{.*post.*})
+ #expire_fragment(%r{.*post.*})
expire_cache_for(bookmark)
end
@@ -6,13 +6,13 @@
%h2 Last 20 bookmarks
- if current_user
- - cache(:fragment => "last_20_posts", :expires_in => 10.minute) do
+ - cache(:fragment => "last_20_posts", :expires_in => 3.minute) do
%div.posts
- @posts.each do |post|
%div.bookmark
= render "/posts/short_post", :post => post
- else
- - cache(:fragment => "last_20_posts_public", :expires_in => 10.minute) do
+ - cache(:fragment => "last_20_posts_public", :expires_in => 3.minute) do
%div.posts
- @posts.each do |post|
%div.bookmark
@@ -32,12 +32,12 @@
= will_paginate(@posts)
- else
- if current_user
- - cache(:fragment => "all_user_#{current_user.id}_posts", :expires_in => 10.minute) do
+ - cache(:fragment => "all_user_#{current_user.id}_posts", :expires_in => 3.minute) do
= render "posts/posts_short", :posts => @posts
.pagination
= will_paginate(@posts)
- else
- - cache(:fragment => "public_all_posts", :expires_in => 10.minute) do
+ - cache(:fragment => "public_all_posts", :expires_in => 3.minute) do
= render "posts/posts_short", :posts => @posts
.pagination
= will_paginate(@posts)
@@ -48,8 +48,8 @@
config.active_support.deprecation = :notify
# memcache
- config.cache_store = :file_store
- #config.cache_store = :dalli_store
+ #config.cache_store = :file_store
+ config.cache_store = :dalli_store
# Global enable/disable all memcached usage
config.perform_caching = true
# Disable/enable fragment and page caching in ActionController

0 comments on commit 143f26c

Please sign in to comment.