Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293241

Rename getCacheTag() to getCacheTags()

$
0
0

Problem/Motivation

There was some discussion about this in #2304987: Don't invalidate cache tags of referenced entities, use entity list cache tags correctly, add test coverage for entity list cache tags. That was going to rename getListCacheTags() to getListCacheTag() but thankfully did not. It does not make sense to be singular as the return value is always an array of tags. It just happens that currently most implementations in core are just returning one.

I am sure this started off life as getCacheTags, so not sure when or why this was changed to the singular version. I guess for similar reasons that the referenced issue above wanted to?

We need to return consistency back to these methods, this makes a better API.

Proposed resolution

Rename this back to getCacheTags().

Remaining tasks

Renaming.

User interface changes

None

API changes

Return to the correctly named method.


Viewing all articles
Browse latest Browse all 293241

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>