daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest May 17th, 2018 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # put this in lib/nil_store.rb:
  2.  
  3. class NilStore < ActiveSupport::Cache::Store
  4.    
  5.   def initialize(location='//myloc'); end
  6.  
  7.   def read(name, options = nil); super; end
  8.  
  9.   def write(name, value, options = nil); super; end
  10.  
  11.   def delete(name, options = nil); super; end
  12.    
  13.   def delete_matched(matcher, options = nil); super; end
  14.    
  15. end
  16.  
  17. # and then in environments/development.rb:
  18.  
  19. require 'nil_store'
  20. config.cache_store = NilStore.new
  21.  
  22. # or you could just turn on development class caching:
  23.  
  24. config.cache_classes = true
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top