Skip to content

Instantly share code, notes, and snippets.

@jotto
Forked from cyx/black_hole_store.rb
Created March 22, 2010 22:09
Show Gist options
  • Save jotto/340593 to your computer and use it in GitHub Desktop.
Save jotto/340593 to your computer and use it in GitHub Desktop.
# need to disable Rails.cache.fetch in test env
# and ActionController::Base.perform_caching doesnt do it
# from http://pivotallabs.com/users/spierson/blog/articles/818-standup-04-30-2009-perform-caching-and-rails-cache-w3c-dtds-and-ie-range-min-max
class BlackHoleStore
def logger
Rails.logger
end
def fetch( *args )
yield
end
def read( *args )
end
def write( *args )
end
def delete( *args )
end
def increment( *args )
end
def decrement( *args )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment