1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

File Cache coding

Discussion in 'Server Configuration and Hosting' started by Cartier, Aug 19, 2013.

  1. Cartier

    Cartier Member

    This is what I included in my config.php file:

    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';

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

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



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

    The only other thing I did was to make a directory in internal_data labelled "cache", and change all the file permissions in internal_data to 777. Is that all I need to do? I'm not getting any errors on my homepage, but I was expecting something to happen. Am I leaving something out?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You have the same line twice - $config['cache']['frontend'] = 'Core';

    All you need for simple file caching is this:
    Code:
    $config['cache']['enabled'] = true;
    $config['cache']['cacheSessions'] = true;
    $config['cache']['backend'] = 'File';
    $config['cache']['backendOptions'] ['cache_dir'] = '/path/to/internal_data/cache';
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';
     

Share This Page