Skip to content

Instantly share code, notes, and snippets.

@ericallam
Created December 8, 2009 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericallam/251886 to your computer and use it in GitHub Desktop.
Save ericallam/251886 to your computer and use it in GitHub Desktop.
# put this in lib/nil_store.rb:
class NilStore < ActiveSupport::Cache::Store
def initialize(location='//myloc'); end
def read(name, options = nil); super; end
def write(name, value, options = nil); super; end
def delete(name, options = nil); super; end
def delete_matched(matcher, options = nil); super; end
end
# and then in environments/development.rb:
require 'nil_store'
config.cache_store = NilStore.new
# or you could just turn on development class caching:
config.cache_classes = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment