Re: Testing objects that cacheby rir (Vicar)
|on May 15, 2009 at 17:41 UTC||Need Help??|
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.
Using Devel::Cover could verify that your caching code is being exercised.
If your cache is implemented with a call tree, i.e.
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 fetch and _cached_fetch to generate statistics on cache performance. I cannot think of the name for this type of function modification.
The insert code could be something like
cleaned up for log readability.