No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If your application is so elaborate to use caching, a debug output in some form is likely to already exist. This allows a practical approach:
1) Reset Cache (or use a fresh instance) 2) The first function call is known to be not cached 3) The second call should be cached. In non-debug mode you can not test this, but results should be equal to 2) 4) Start another instance in debug mode after a cache reset. 5) Call the function two times 6) Compare the debug output, which should contain 'I am (not) cached' type statements. 7) Compare results of all 4 calls.
In reply to Re: Testing objects that cache
by NiJo
|
|