As part of #2124957: Replace 'content' cache tag with 'rendered' and use it sparingly, we added standardized cache tags to all entities in #2217749: Entity base class should provide standardized cache tags and built-in invalidation (with test coverage).

The DateFormat config entity type entity type affects rendered content all over the place: it's used pretty much everywhere. It seems appropriate in this case to not set cache tags that bubble up, but to just clear the entire render cache. Especially because it hardly ever changes: it's a set-and-forget thing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Needs review
FileSize
1.05 KB
tstoeckler’s picture

I think this makes sense.

However, I think we should improve the comment to say *why* we are doing this. I.e. that it's a performance improvement to have less tags.

Also shouldn't we override getCacheTag() to be a no-op?

Wim Leers’s picture

Assigned: Wim Leers » catch

Assigning to catch for feedback, before I develop this further.

catch’s picture

I just posted on #2124957: Replace 'content' cache tag with 'rendered' and use it sparingly - should we continue there and postpone this one?

Wim Leers’s picture

Status: Needs review » Postponed
Issue tags: -sprint

Yes, let's block this on that.

catch’s picture

Assigned: catch » Unassigned
effulgentsia’s picture

Status: Postponed » Needs review

#4 is in.

Status: Needs review » Needs work

The last submitted patch, 1: dateformat_cache_tags-2241275-1.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
754 bytes
moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense to delete the whole render cache when date formats change. Better than adding cache tags to almost all cache entries. So, RTBC.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

  • Dries committed e52aaf1 on
    Issue #2241275 by Wim Leers: DateFormat cache tag: don't set the cache...
Wim Leers’s picture

Now that this one is in, let's get #2241267-3: Make tours set cache tags done!

Status: Fixed » Closed (fixed)

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