Guest User

Untitled

a guest
May 17th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment