Skip to content

[Issue] Update FlushCacheByTags to use after plugins instead of around plugins #29558

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #27077: Update FlushCacheByTags to use after plugins instead of around plugins


Description (*)

This PR contains a few small quality of life improvements to the FlushCacheByTags class:

  1. Conversion of around plugins to after plugins.
    These original plugins were created when after plugins did not contain the arguments to the original call. Now that they do, we can move to after plugins and not affect the call stack
  2. Micro-optimization in cleanCacheByTags.
    Calling array_unique in a loop, for the same variable isn't great. This change now caches it in a local variable.
  3. Updating doc-blocks.
    Newer documentation standards request the exclusion of parameters and return types that are duplicative in nature. I've also updated the small descriptions to read better

Preconditions (*)

  1. Magento 2.4-develop

Steps to reproduce (*)

  • Perform step debugging in Plugin before/after changes and compare that tags are the same during the following scenarios:
    • Product Creation
    • Production Deletion

Expected result (*)

The tags are the same

Actual result (*)

The tags are differant

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: AppFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions