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

Caching

Discussion in 'Server Configuration and Hosting' started by Hristo Avramov, Nov 27, 2014.

  1. Hristo Avramov

    Hristo Avramov Active Member

    I want to move to VPS and install apc cache. I found in this thread how to enable it https://xenforo.com/community/threads/tip-use-apc.6456/

    My questions are:
    1. I have this code in the config.php that enables simple caching, should I remove it?
    Code:
    $config['superAdmins'] = '1';
    
    $config['cache']['enabled'] = true;
    
    $config['cache']['backend'] = 'File';
    $config['cache']['backendOptions'] = array('cache_dir'  => '/home2/morethb8/public_html/bettingforum/internal_data/cache');
    
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] = array('caching'  =>  true,
                                                'automatic_serialization' => true,
                                                'lifetime'    => 1800
    ); 
    2: I also have mods for caching- xen cache and bd-cache. Should I disable some of them too or no?
     
  2. Hristo Avramov

    Hristo Avramov Active Member

    Can you at least tell me if I need to remove the simple filecache if I installed apc ?
     
  3. Solidus

    Solidus Well-Known Member

    Firstly, remove either xen cache or bd cache, they do the same thing. Either one is fine alongside APC though.
    You also need the following in your config.php at least,

    $config['cache']['backend'] = 'Apc';
     
  4. Hristo Avramov

    Hristo Avramov Active Member

    Thank you,

    what about this
    $config['cache']['backend'] = 'File';

    Should I remove it ?
     
  5. MattW

    MattW Well-Known Member

    Yes, as that will store the cached files into the file system, rather than using the specified cache (Apc / Xcache etc)
     
  6. Hristo Avramov

    Hristo Avramov Active Member

    Thank you, I deleted all other caches, now my cache code looks just like this, is it okay ?

    Code:
    $config['cache']['backend'] = 'Apc';
    
    
     
  7. MattW

    MattW Well-Known Member

    This was my config.php setup with APC enabled

    PHP:
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
    $config['cache']['backend'] = 'Apc';
     
    Hristo Avramov likes this.
  8. Hristo Avramov

    Hristo Avramov Active Member

    Thank you, I will just use this config
     
    MattW likes this.
  9. Hristo Avramov

    Hristo Avramov Active Member

    If I have 2 xenforo, do I need ot use other cahe prefix or the same ?
     
  10. RoldanLT

    RoldanLT Well-Known Member

    WRONG.
    Xen Cache helps both Guest and Members Login.
    BD Cache mostly plays for the Guest.
    Only the css and defer js thing works for both guest and member.
     
  11. Solidus

    Solidus Well-Known Member

    I looked that up after. There was another addon named xen cache or similar that did the same thing though, can't find it now.
     
  12. RoldanLT

    RoldanLT Well-Known Member

  13. MattW

    MattW Well-Known Member

    Use a unique prefix for each of the sites.
     

Share This Page