Fetch public templates as files and Minify CSS

mrGTB

Well-known member
I'm not sure if I should activate either of these two settings using "File Cache". The settings are called "Fetch public templates as files and Minify CSS". Would I gain anything by doing so, or make matters worse. Keeping in mind I'm on shared hosting and only use the basic File Cache method.
 
You can minify CSS with no issues.

To enable 'Fetch public templates as files' though, you need to have opcode cache installed on your server (APC, eAccelerator, XCache etc.).
 
I thought that might be the case, that's how I just set them up, activate CSS but left the other disabled because of what you said it needs. Before I had the later enabled.
 
You can minify CSS with no issues.

To enable 'Fetch public templates as files' though, you need to have opcode cache installed on your server (APC, eAccelerator, XCache etc.).

Is that all? The minify option in the ACP says you have to modify the config.php file as well. Is that a requirement?
 
You need to implement caching, as explained here: http://xenforo.com/help/cache/

For reference, this is in my config.php:
PHP:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] ['cache_dir'] = '/path/to/cache/directory';
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';
 
You need to implement caching, as explained here: http://xenforo.com/help/cache/

For reference, this is in my config.php:
PHP:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] ['cache_dir'] = '/path/to/cache/directory';
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';

Right. Well, you don't have examples for xcache on that page.

Also, if xcache is implemented on the server, is it necessary to change the config.php?
 
You need to implement caching, as explained here: http://xenforo.com/help/cache/

For reference, this is in my config.php:
PHP:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] ['cache_dir'] = '/path/to/cache/directory';
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';

That's different from mine. How comes your using a cache_id_prefix, you running more than one forum?

Code:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
 
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/home/xxxxx/public_html/internal_data/file_cache');
 
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800
);
 
What is the advantage
of this
Code:
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';

over this
Code:
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800);
 
If I'm correct the prefix should only be used if your running more than one instance of XenForo on the same server. If you running just the one forum it's of no use from what I've read with other forum software using that option. That's my general understanding of it's use.
 
Top Bottom