Created
October 29, 2013 12:05
-
-
Save tjchambers/7213452 to your computer and use it in GitHub Desktop.
Code to create dalli down error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'dalli' | |
memcache ||= Dalli::Client.new | |
a = :dalli_store, '127.0.0.1', | |
{:namespace => lambda { | |
generation = $memcache.incr 'mv|' + Rails.env, 1, 0, 1 | |
"#{generation.to_s}.#{Time.now.strftime('%j')}" | |
}} | |
memcache.incr 'test',0,0,0 | |
memcache.incr 'test' | |
memcache.incr 'test' | |
memcache.incr 'test',0,0,'bad' | |
sleep(5) | |
memcache.incr 'test' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment