I used "dualvar" also, in MCE::Shared::Cache. When max_age is specified during construction of the cache, the dualvar is used internally to store the expiration time with the key name in the keys array.
# update expiration $keys->[ $off ] = ( $exptime >= 0 ) ? dualvar( time + $exptime, $_[1] ) : dualvar( -1, $_[1] );
Basically, the "dualvar" capability in Perl allows the "max_age" feature without increasing the memory consumption of the cache or impacting performance.
In reply to Re^3: Schizophrenic var
by marioroy
in thread Schizophrenic var
by bliako
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |