note
rir
Scaling up the load of your normal tests will show if your
code "works" in a pragmatic sense. That is difficult in your case or you have undisclosed motives.
<p>
Using <c>Devel::Cover</c> could verify that your caching code is being exercised.
<p>
If your cache is implemented with a call tree, i.e.
<c>
sub fetch {
return _cached_fetch($_[1]) if _cached( $_[1] );
return _via_normal_retrieval( $_[1] );
}
</c>
there are packages that will insert code at the entry or
exit of a set of routines. This would let you insert a logging function
into <c>fetch</c> and <c>_cached_fetch</c> to generate statistics on cache performance. I cannot think of the name for this type of function modification.
<p>
The insert code could be something like
<c>
sub log_cache {
local $, = " ";
print SOMEWHERE "MyObj cache called", caller(1), "w/",$_[1],$/;
}
</c>
cleaned up for log readability.<p>
Be well,<br>rir
764268
764268