Created
May 27, 2014 02:30
-
-
Save sioncojp/c2eb410049e8c4a15eea to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Cache::Memcached::Fast; | |
use String::Random; | |
my $memd = Cache::Memcached::Fast->new({ | |
servers => [{address => 'localhost:11211'}], | |
utf8 => ($^V ge v5.8.1 ? 1 : 0), | |
}); | |
for ( my $i=0; $i<100000000; $i++ ) { | |
my $key = "key-${i}"; | |
my $data = String::Random->new->randregex('[A-Za-z0-9]{10}'); | |
$memd->set($key, $data, 60 * 60 * 24); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment