Help for this page

Select Code to Download


  1. or download this
    $ diff test-cache-lru.pl test-cache-mce.pl 
    1a2,3
    ...
    < my $c = Cache::LRU->new(size => 500000);
    ---
    > my $c = MCE::Shared::Cache->new(max_keys => 500000);
    
  2. or download this
    $ diff test-cache-lru-with-expires.pl test-cache-mce-with-expires.pl 
    1a2,3
    ...
    < my $c = Cache::LRU::WithExpires->new(size => 500000);
    ---
    > my $c = MCE::Shared::Cache->new(max_keys => 500000);
    
  3. or download this
    $ perl test-cache-lru.pl 
    Mapping
    ...
    Read : 1054666.70019362
    Found: 500000
    Mem  : 254976000
    
  4. or download this
    $ perl test-cache-lru-with-expires.pl 
    Mapping
    ...
    Read : 994375.492182959
    Found: 500000
    Mem  : 254980096
    
  5. or download this
    $ diff demo-from-doc.pl test-cache-parallel-mce.pl 
    17c17
    ...
    <             for ( @{ $chunk_ref } ) { $c->set($_, {md5 => $_})  }
    ---
    >             for ( @{ $chunk_ref } ) { $c->set($_, {md5 => $_}, 600) 
    +}
    
  6. or download this
    $ diff test-cache-parallel-mce.pl test-cache-parallel-redis.pl 
    10a11,12
    ...
    >                 $srl = decode_sereal($srl) if defined $srl;
    >                 $f++ if ref $srl eq 'HASH';
    >             }
    
  7. or download this
    $ perl test-cache-parallel-mce.pl 
    Mapping
    ...
    Read : 60989.7109982115
    Found: 600000
    Mem  : 270336