fix #2675: never allow CacheCache and database information to be disjoint

When we enter a new cache into the CacheCache, we need to make sure that
the information already about this cache is merged in. Otherwise, we
risk having two disjoint sets of information because we ignore and may
later override information stored in the database.