Optimized cache for use with callbacks