I am pleased to announce that at launch, this extension will also feature query and "smart" caching.
Function:
The query cache sits between Flarum and your MySQL database, it listens for requests, notes the MySQL command, and caches the data from MySQL. The next time the same data is requested it will load it straight from memory, taking a massive load off your server.
Security:
As with the rest of ReCache, query caching is permission aware, Byobu and posts in restricted tags will continue to stay private, while still benefitting from the cache.
Smart caching:
The query cache listens to all database queries which means it knows when discussions are added, posts are updated, or when a new user registers. The cache will Intelligently update its store so your forum is always up to date, and nothing is missed.
How it's different:
With the base request cache (the one ReCache started with), discussions and posts cannot be cached as there is no way to update them cleanly. With the new query cache, we can cache the request to those routes.
Third-party extensions:
Query caching will support All Flarum extensions that make calls to the database.
Gains:
Using Redis we saw a 50% reduction in load times for discussions, posts, and user search (once cached) and a significant decrease in load on the database as time progressed.
Because of the amount of different requests that need to be cached, query and smart caching will only be available if you use Redis. If this isn't an option for you, you can continue to reep the load reductions (see here) with the base caching functions.
I can't wait to get this extension into your hands. I'm really excited to see what this can do for your forums.