A new feature in CodeIgniter 4.2 are View Decorators, which simply allow you to modify the generated HTML just prior to it getting cached. Watch the video to understand how they work and how/when you might want to use them.
Lonnie Ezell is a programmer, author, musician, spouse, and father. He is the lead developer on CodeIgniter 4, and Bonfire--an admin framework for CodeIgniter 3 and now 4. He has written two books on CodeIgniter, and ran a popular Tabletop RPG podcast for several years.