How do I enable file caching?

I have created a cache directory in internal_data/cache and chmod 777

is code correct
Code:
$config['cache']['enabled'] = true;

$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/usr/home/w****/public_html/community/internal_data/cache');

$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800);

and is it to be inserted into library/config

Any issues using this if i am on a cdn
 
Last edited:
I wouldn't normally recommend bothering with the file cache unless you have a particular reason for it -- depending on server configs, just not using it can be better.

But that should work and there won't be any CDN issues.
 
Back
Top Bottom