first cache implementation