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

XF 1.2 Cache setting

Discussion in 'XenForo Questions and Support' started by redwolf6, Aug 7, 2013.

  1. redwolf6

    redwolf6 Member

    Hello,

    I want my forums to run faster so I found this:

    http://xenforo.com/help/cache/

    What do I have to do exactly? just add this to the config.php file?

    HTML:
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
    $config['cache']['cacheSessions'] = true;
    
    You may alter the 'cache_id_prefix' values to suit your own needs.

    What does that mean? I change xf - so it's the same prefix of my xenforo database?

    Is there anything else I can add? I don't have APC or memcached installed as it's a shared hosting.

    Thanks!
     
  2. Sheratan

    Sheratan Well-Known Member

    I use this:

    Code:
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
    
    $config['cache']['backend'] = 'File';
    $config['cache']['backendOptions'] ['cache_dir'] = '/path/to/folder/where/you/put/cache';
    cache_id_prefix means prefix for your file cache. You can change it to whatever you wanted. You don't have to set it same as database prefix.

    I will recommended cache_dir = /internal_data/somefolder/

    Of course you need to create the somefolder first, and chmod to 777
     
    Last edited: Aug 7, 2013
  3. redwolf6

    redwolf6 Member

    Thanks a lot! :)

    So the path will be what? /internal_data/cachefolder? or it'll be full link?
     
  4. Sheratan

    Sheratan Well-Known Member

    Try /internal_data/cachefolder first.

    If you recieved error, try full link like /home/account/public_html/internal_data/cachefolder
     
  5. redwolf6

    redwolf6 Member

    Thank you :)

    How do I know if it's an error?

    And will this cache help my forum to be faster? will there be any delay with showing the new posts?

    What does it do actually?

    Sorry I know a lot of questions :giggle:
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    You can also use APC or Memcached for the back end, if your server is configured, rather than simple file store.

    You will likely need to be on a VPS to use that though - file store is generally for those on shared hosting.
     
  7. Sheratan

    Sheratan Well-Known Member

    You can't open your forum. ;)

    Depends on how big your forum. If you have a small forum, you will not notice any different, probably.

    Dunno. I'm not a techie person. :D

    No problems. :)
     

Share This Page