Front-end verses back-end caching

Jon12345

Well-known member
I want to set up some caching on my Xenforo site. I've become obsessed with getting the page load faster! :D

One thing I am not 100% sure on is the difference between front-end and back-end caching. Does front-end caching refer to css, images and javascript, while back-end caching refers to mysql data?
 
I am going through the process of trying to cache both frontend and backend. I've setup a CDN for images and javascript, but I notice the CSS is not getting cached. Can I cache that too, using the config.php file?
 
Ok, I tried to cache the front-end using config.php. I used the following:

Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'ApcCache';
$config['cache']['sessions'] = true;

But I got a 500 error.

What might I be doing wrong?

I am on php 7.3.14 if that makes any difference.
 
Do you have the APCu PHP extension installed? You would need to install the relevant extension/provider for any of the caching options to work properly. I personally use Memcached, and I know a lot of people use Redis.
 
Redis + PHP Opcache + LSCache is the most optimal.
Are you referring to those 3 as a combination being the best option for front-end caching? Or are you referring to front-end and back-end caching?

My server currently has litespeed + cache on it, both yet to be applied to my site, mostly because it is slightly beyond me at the moment!
 
@dknife That is a good point. I read something somewhere about front-end caching and back-end caching, but I now can't find it. Perhaps it was a post on this forum somewhere. I suppose my original question in this thread suggests I don't know:

Does front-end caching refer to css, images and javascript, while back-end caching refers to mysql data?

I do know what I want though. I want a fast cached setup! So, in my mind I am thinking mysql queries are perhaps the backend and css/sessions are the front end. My CDN nicely caches the images and javascript. But the CSS is currently not cached. Nor are my guests.
 
I just added this as a test to my config.php:

Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Memcached';
$config['cache']['config'] = [
    'server' => '127.0.0.1'
];

$config['cache']['sessions'] = true;

But I swear I can't see any page speed difference. In fact, using PageSpeed Insights, I got a lower score! How can you determine if your cache is working properly or not? Should you be seeing lower Load Averages? Or is there another way to test?
 
Top Bottom