We have an external entity, which is invalidated using an API when there is a change in the external system. We use $entity->getCacheTagsToInvalidate() in order to invalidate the entities cache, when we get notified of a change.

Unfortunately the values from the API are not rebuild, when this is called.
Looking into the code, we see that those tags are not set, when the entity is set in cache in setPersistentCache.

Attached is a patch, to fix that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eyilmaz created an issue. See original summary.

echo15’s picture

There is small typo in patch #1

Here is a fixed version.

echo15’s picture

Status: Active » Needs review
attiks’s picture

Status: Needs review » Fixed

  • attiks committed d5d79e1 on 8.x-2.x authored by echo15
    Issue #3176491 by eyilmaz, echo15: Missing entity cache tags in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.