Permalink
Browse files

Add memcached config to config.ru

  • Loading branch information...
1 parent 708b2d2 commit a466105d846e992f5ba5afc08779e922cc7a383f @garethrees committed Nov 22, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 config.ru
View
@@ -1,8 +1,16 @@
require 'rubygems'
require 'bundler'
+require './fonts'
-Bundler.require
+Bundler.require :default, (ENV['RACK_ENV'] || 'development').to_sym
+
+# Defined in ENV on Heroku. To try locally, start memcached and uncomment:
+# ENV['MEMCACHE_SERVERS'] = 'localhost'
+if memcache_servers = ENV['MEMCACHE_SERVERS']
+ use Rack::Cache, verbose: true,
+ metastore: "memcached://#{ memcache_servers }",
+ entitystore: "memcached://#{ memcache_servers }"
+end
-require './fonts'
run Fonts

0 comments on commit a466105

Please sign in to comment.