flesh out the rest of the cache invalidaton logic