After long last, it's finally here!
ReCache enables caching of requests and database queries, image optimization, and image lazy loading. Greatly reducing the overall loading time for pages on your forum. Supports Redis.
Gains and Data:
All data was taken from an Ubuntu server running 18.04.
The first image is of a guest who has never loaded the website, and is an Uncached response (no browser cache and no ReCache) - response time: 1308ms
The second image is of a guest who has never loaded the site and is only cached via ReCache (No browser) - response time: 634
For guests, you are looking at around a 52% reduction in loading times.
For users however, the speed up is more dramatic as they're utilizing the browser cache as well - only 103 ms!!
That's an incredible 93% page load time reduction.
With query caching 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.
ReCache 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.
Integrations and Security
- ReCache, is permission aware, Byobu and posts in restricted tags will continue to stay private, while still benefiting from the cache.
- ReCache supports all 3rd-party extensions that make use of the database in Flarum.
- ReCache supports
fof/upload for image optimization.
extiverse/bazaar or check the FAQs on flagrow.io on how to use a custom token, then run:
$ composer require reflar/recache --prefer-dist -o
Go into your admin area then the extensions panel, and enable it.
After updating or installing new extensions:
Inside your Flarum root directory run
$ php flarum recache:clear.
This will clear the ReCache and allow the new extensions to add their code to Flarum.
Configuration & Troubleshooting:
See the extension page.