How do I invalidate the cache of an entity? Is there any easy way to clear the cache for a custom entity?
I know there is an entry in the cache_entity-Table. If i manually delete it, everything is fine.
I tried doing the same as in \Drupal\Core\Entity-&gt;invalidateTagsOnSave() or \Drupal\Core\Entity-&gt;invalidateTagsOnDelete(). This does not seem to change anything.

Unfortunately I can't just load the entity and resave it in this situation.
But you know the entity ID that you want to have invalidated?

Then use \Drupal::entityTypeManager()-&gt;getStorage($entity_type_id)-&gt;resetCache([$id]);