How do I enable file caching?

It's for something else in the future...
Ooh, now I'm curious! :D

On a serious note, though, I'm really glad that the topic of enabling the filecache came up... the instructions from Cezz worked perfect (using internal_data/cache) and will come in handy in the next few weeks with another conversion.
 
No trailing slash for me. If that full path is correct, did you chmod the folder to 777 to make sure it is writable?
Bah, was bound to be something obvious. I hadn't changed the folder permissions, I'll give that a bash. :)
Just this:

$config['cache']['backendOptions'] = array('cache_dir' => 'internal_data/cache');

I'm using XAMPP on localhost so no need to chmod.

No full path for you but you're doing this local yeah?
 
Bugger.

Using the following

Code:
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/var/sites/t/the-sps.org/public_html/internal_data/cache');

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

Parse error: syntax error, unexpected $end, expecting ')' in /var/sites/t/the-sps.org/public_html/library/config.php on line 39

?
 
Bugger.

Using the following

Code:
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/var/sites/t/the-sps.org/public_html/internal_data/cache');

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

Parse error: syntax error, unexpected $end, expecting ')' in /var/sites/t/the-sps.org/public_html/library/config.php on line 39

?
Looks like you may have missed the closing bracket...
Code:
);
... that should be the last line.
 
Bugger.

Using the following

Code:
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/var/sites/t/the-sps.org/public_html/internal_data/cache');

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

Parse error: syntax error, unexpected $end, expecting ')' in /var/sites/t/the-sps.org/public_html/library/config.php on line 39

?

Don't you think, you are missing closing bracket ")" after 1800 in the last line. :-)
 
Both mate.

Nothing going in the folder and the same syntax error above except it's switched lines.
You've got a bad file yet.
Here's a copy of the my config file (minus some values of course)...
Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = '{REMOVED}';
$config['db']['password'] = '{REMOVED}';
$config['db']['dbname'] = '{REMOVED}';
$config['superAdmins'] = '1';

// Cache
$config['cache']['enabled'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '{REMOVED}');
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800
);

if ($_SERVER['REMOTE_ADDR'] == '{REMOVED}')
{
    $config['debug'] = true;
}
 
ha got it working, LIKES FOR EVERYONE.

Right so first time the error was caused by not having that closing bracket ");" anywhere, next I think I placed it wrong and somehow was missing a "/" in the fullpath. Site is working now with that code in the config but the cache folder is empty.
 
Here's mine.

Code:
<?php

$config['db']['host'] = '********';
$config['db']['port'] = '3306';
$config['db']['username'] = '********';
$config['db']['password'] = '********';
$config['db']['dbname'] = '********';
$config['superAdmins'] = '1';
 
$config['externalDataPath'] = 'data';
$config['externalDataUrl'] = 'http://static.the-sps.org/data';
$config['javaScriptUrl'] = 'http://static.the-sps.org/js';

$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array('cache_dir'  => '/var/sites/t/the-sps.org/public_html/internal_data/cache');

$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800);
 
Refresh a few pages and then your FTP app, it will then show the files.
Hey Brogan,

Cheers for that, I've been doing all that and nothing. I'll maybe leave it another half hour and see what happens.

Could you do me a favour though, could you split my crap off from the rest of this thread. I feel really bad now looking at how much I've side tracked this thread :)
 
Top Bottom