Skip to content

Instantly share code, notes, and snippets.

@sioncojp
Created May 27, 2014 02:30
Show Gist options
  • Save sioncojp/c2eb410049e8c4a15eea to your computer and use it in GitHub Desktop.
Save sioncojp/c2eb410049e8c4a15eea to your computer and use it in GitHub Desktop.
#!/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