try using rack cache for in memory caching
This commit is contained in:
parent
b35763baa3
commit
86ab67feb2
1
Gemfile
1
Gemfile
|
@ -8,6 +8,7 @@ gem 'sinatra-contrib'
|
|||
gem 'yard-sinatra', github: 'rkh/yard-sinatra'
|
||||
gem 'rack-contrib', github: 'rack/rack-contrib'
|
||||
gem 'rack-ssl', '~> 1.3'
|
||||
gem 'rack-cache'
|
||||
|
||||
group :development, :test do
|
||||
gem 'rake', '~> 0.9.2'
|
||||
|
|
|
@ -291,6 +291,7 @@ DEPENDENCIES
|
|||
mocha (~> 0.12)
|
||||
newrelic_rpm (~> 3.3.0)
|
||||
pg (~> 0.13.2)
|
||||
rack-cache
|
||||
rack-contrib!
|
||||
rack-ssl (~> 1.3)
|
||||
rake (~> 0.9.2)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'rack'
|
||||
require 'rack/protection/path_traversal'
|
||||
require 'rack/cache'
|
||||
|
||||
class Travis::Web::App
|
||||
ASSET_DIRS = %r(/(styles|scripts)/)
|
||||
|
@ -31,7 +32,10 @@ class Travis::Web::App
|
|||
use Rack::Protection::PathTraversal
|
||||
|
||||
use Travis::Web::App::Api, config if config.run_api?
|
||||
|
||||
use Rack::Cache, verbose: true, metastore: 'heap:/', entitystore: 'heap:/' if config.production?
|
||||
use Rack::Deflater if config.deflate?
|
||||
|
||||
use Travis::Web::App::Assets, config
|
||||
use Travis::Web::App::Filter, config
|
||||
run Travis::Web::App::Files.new
|
||||
|
|
Loading…
Reference in New Issue
Block a user