Best practice for caching finder results (Entity Collections) in a controller?

Status
This content is read-only, or is not open for further replies.

Atakan KOC

Guest
offline
Hi everyone,

I'm building a custom addon for XenForo 2.3.x and I'm trying to implement caching in my controller to reduce database queries on my homepage. I'd appreciate some guidance on the correct approach.

What I'm trying to do:
Cache the result of multiple finder queries (threads, statistics) so they don't hit the database on every page load.

My current approach:

Fetching from cache:
PHP:

Code:
$cache = $this->app()->cache();
$key = 'index_data_v1';
$cachedData = $cache ...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom