perl -MMemoize -MMemoize::Expire -MSerializeValues -E " \ sub f { ('X',int rand 100) }; \ tie my %subcache => 'Memoize::Expire', NUM_USES => 3; \ tie my %cache => 'SerializeValues', \%subcache; \ memoize 'f', LIST_CACHE => [ HASH => \%cache ], \ SCALAR_CACHE =>'MERGE' ; \ for (1..6) { say f() }"