-
-
Save coreyti/634258 to your computer and use it in GitHub Desktop.
NilStore for Rails 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.cache_store = :nil_store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/cache' | |
class ActiveSupport::Cache::NilStore < ActiveSupport::Cache::Store | |
def initialize(*args); | |
super | |
end | |
def fetch(*args, &block) | |
yield | |
end | |
def read(*args) | |
super | |
end | |
def write(*args) | |
super | |
end | |
def delete(*args) | |
super | |
end | |
def delete_matched(*args) | |
super | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment