Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added railtie to set config.cache_store.

This addresses rails/rails#6296
  • Loading branch information...
commit 5f9c3bfd79dec609208aa01f05bc6dc44d4feeda 1 parent 157975f
Steve Klabnik authored
Showing with 8 additions and 0 deletions.
  1. +1 −0  lib/dalli.rb
  2. +7 −0 lib/dalli/railtie.rb
1  lib/dalli.rb
View
@@ -4,6 +4,7 @@
require 'dalli/socket'
require 'dalli/version'
require 'dalli/options'
+require 'dalli/railtie' if defined?(Rails)
module Dalli
# generic error
7 lib/dalli/railtie.rb
View
@@ -0,0 +1,7 @@
+module Dalli
+ class Railtie < ::Rails::Railtie
+ config.before_configuration do
+ config.cache_store = :dalli_store
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.