Skip to content

Instantly share code, notes, and snippets.

@coreyti
Forked from ericallam/gist:251886
Created October 19, 2010 14:15
Show Gist options
  • Save coreyti/634258 to your computer and use it in GitHub Desktop.
Save coreyti/634258 to your computer and use it in GitHub Desktop.
NilStore for Rails 3
config.cache_store = :nil_store
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