Implementation using an internal cache.