Laravel Tagged Cache is a reasonably straightforward wrapper around the cache implementation to reduce complexity regarding caching in your Models. Note that this requires using a Cache implementation that supports tags.
':displayname) or anything like that, as the heavy lifting is done inside the cache tags instead.
If, for example, you put something like this in your BlogEntry model: public function getContent(): string { return $this->taggedCache('markdown')->remember('content', now()->addHour(), fn () => $this->entry)}
Something like this in your BlogEntryObserver would do the trick: public function updated(BlogEntry $blogEntry): void { if ($blogEntry->isDirty(['title', 'content'])) { $blogEntry->taggedCache()->flush(); }}