Build lifespan options array only when it's used

Created on 8 May 2025, 10 days ago

Problem/Motivation

The $this->lifespanOptions property of the AdvancedViewsCache plugin is built every time the object is instantiated, but only used when an admin is looking at the cache configuration form built by ::buildLifespanOptions().

As it stands, every time a view is cached using this plugin, the build code is run but the result not used.

Proposed resolution

Build the lifespan options inside ::buildLifespanOptions() instead of the constructor.

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • @todo
📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇦🇺Australia elc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024