3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/radiant_tools/config.rb', line 3
def self.update(config)
config.gem 'rack-rewrite'
require 'rack-rewrite'
config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
r301 %r{^\/(.+?)(?:\/)(\?.+)$}, '/$1$2', :method => 'GET' r301 %r{^\/([^?]+[^\/])$}, '/$1/', :method => 'GET', :not => /^\/admin\// end
config.gem 'rack-cache'
config.gem 'redis-store'
config.middleware.use ::Radiant::Cache,
:metastore => "redis://#{REDIS}/meta_store",
:entitystore => "redis://#{REDIS}/entity_store",
:verbose => true
RedisRadiantStore.init
config.cache_store = :redis_store, "redis://#{REDIS}/cache_store"
end
|