Permalink
Browse files

enable sendfile support

  • Loading branch information...
1 parent 4e0d461 commit cc5a21668783ada5a52d8914e86729fdb0fc5f95 @tobi committed Aug 17, 2009
Showing with 8 additions and 1 deletion.
  1. +7 −0 config.ru
  2. +1 −1 config/env.rb
View
7 config.ru
@@ -2,8 +2,15 @@
require 'rubygems'
require 'rack/cache'
+require 'rack/contrib'
require 'image_server'
+# Add rack sendfile extension.
+# Allows us to serve cache hits directly from file system
+# by nginx (big speed boost). read:
+# http://github.com/rack/rack-contrib/blob/5ea5e585a43669842314aa07f1e603be70d6e288/lib/rack/contrib/sendfile.rb
+use Rack::Sendfile
+
# 1. Forget about stupid favicons
use FaviconFilter
View
2 config/env.rb
@@ -13,7 +13,7 @@
require 'memcached'
ENV['META_STORE'] = 'memcache://127.0.0.1:11211/meta'
-ENV['ENTITY_STORE'] = 'file:/tmp/cache/rack/body'
+ENV['ENTITY_STORE'] = 'file:/data/cache/rack/body'
# Logging

0 comments on commit cc5a216

Please sign in to comment.