Caching an expensive computation is a great way to improving performance, but when it goes wrong the bugs can be very subtle. It's vital to be sure sure that the cached result is, for all intents and purposes, the same as what the computation would have produced. A technique I often employ is using a thunk to defer the computation: $cache_helper->get_value( $key, sub { ... produce the expensive re