Problem
There are two typos in metatag_metatags_cache_clear() method which cause whole Metatag cache bin to clear when a change is made in a single entity.
Steps to Reproduce
Edit any node, change Metatags, save.
Expected Result
It should clear just the cache regarding the edited node.
Experienced Result
It clears the whole node cache from Metatag cache bin.
Proposed resolution
Change metatag.module line 587 from
if (empty($entity_id)) {
to
if (empty($entity_ids)) {
and change metatag.module line 591 from
if (!array($entity_ids)) {
to
if (!is_array($entity_ids)) {
Remaining tasks
The attached patch needs to be tested and included in the module.
Comments
Comment #1
adee147 commentedComment #2
damienmckennaFYI when you upload a patch you should change the status to "needs review", that way the system will trigger the automated test.
Comment #3
damienmckennaComment #4
damienmckennaCorrected the patch so it can apply properly.
Comment #6
damienmckennaCommitted. Thanks adee147!