Easy memory cache for single-threaded environments