![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Testing objects that cacheby sgifford (Prior) |
on May 18, 2009 at 04:20 UTC ( #764577=note: print w/replies, xml ) | Need Help?? |
I have solved similar problems by exposing some useful but very limited bits of the cache internals through an API. For example, a method to keep a count of the number of cache hits and misses. With that, you can tell whether your test hit or missed the cache by comparing the counters before and after. I often find these sorts of methods useful for logging after the fact.
In Section
Seekers of Perl Wisdom
|
|