XF 2.1 Guest Page Filecache Example

nrep

Well-known member
I'd be really grateful if someone would be able to post a basic example of a working guest page caching config using filecache. I can successfully enable the filecache in config.php and it writes to the file system correctly, but when I try adding the guest page cache option it gives me a server error (i.e. last 3 lines).

My existing simple config uses this:

Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Filesystem';
$config['cache']['config'] = [
    'directory' => '/tempcache'
];

$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Filesystem';
$config['cache']['context']['page']['config'] = [];
 
You have to specify a directory for where you want the cache files stored, for example:
Code:
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Filesystem';
$config['cache']['context']['page']['config'] = [
    'directory' => '/path/to/your/page/cache/directory'
];
 
Top Bottom