/instiki/svnpassword

To download this project, use:
bzr branch https://golem.ph.utexas.edu/~distler/code/instiki/svn/
305 by Jacques Distler
Drop hostname from cache key
1 
# based on http://pastie.org/49840
2 
# override the fragment_cache_key method in actionpack/lib/action_controller/caching/fragments.rb
3 
# to remove hostname in fragment caching
4 
# so instead of caching different fragments for "example.com/posts/list" and 
5 
# "www.example.com/posts/list", instead it will just use "posts/list"
6 
module CachingStuff
7 
 module ActionController
8 
 module Caching
9 
 module Fragments
10 
 def fragment_cache_key(key)
539 by Jacques Distler
Fix Caching
11 
 ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key.merge(:host=>"")).split(":///").last : key.split('/')[1..-1].join('/').gsub(/\?format=.*/,''), :views)
305 by Jacques Distler
Drop hostname from cache key
12 
 end
13 
 end
14 
 end
15 
 end
16 
end
17 
18 
ActionController::Base.class_eval do
19 
 include CachingStuff::ActionController::Caching::Fragments
20 
end

AltStyle によって変換されたページ (->オリジナル) /