PHP 5.3 Closure based caching function compatible with the DrupalCacheInterface.