Adding detection of already existing cache entries when creating