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

Cache options on shared server?

Discussion in 'Server Configuration and Hosting' started by drastic, Apr 15, 2014.

  1. drastic

    drastic Well-Known Member

    Can someone walk me through the steps to implement a cache while on a shared server?

    I was reading a handful of threads on here and ended up confused. Is Xcache this: http://xcache.lighttpd.net/

    Or is Xcache something else by Xenforo?

    And on this page:
    http://xenforo.com/help/cache/

    Do I simply add those lines to my config file and that's it? Or is there other installing I have to do?

    Reading 20 different things got me all confused!
     
  2. Tracy Perry

    Tracy Perry Well-Known Member

    Check with your host before you enable anything. Most shared hosts do not configure xCache, APC, MemCache(d) for shared hosting environments. There were a few (@Mike Edge was one when he had his hosting company) that do - but they are few and far between.
    Normally you would use APC/xCache/MemCache(d), etc on a VPS or dedicated service.
     
    The Forum Heroes likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    I used to use this when I was on a shared server:
    Code:
    $config['cache']['enabled'] = true;
    $config['cache']['cacheSessions'] = true;
    $config['cache']['backend'] = 'File';
    $config['cache']['backendOptions'] ['cache_dir'] = '/path/to/cache';
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';
     
  4. drastic

    drastic Well-Known Member

    @Brogan - just paste it in the config and good to go?
     
  5. Tracy Perry

    Tracy Perry Well-Known Member

    For file caching... yep. That's what I used for the short (VERY short) time I was on shared hosting.
     
  6. drastic

    drastic Well-Known Member

    i tried it. got a weird error. i'm gonna say i was supposed to create a /cache directory and 777 it, correct? and then enter the path for it, yes?

    edit- yup...needed that! seems to be filled with data now.

    should I keep it 777 tho? or 666?
     
    Last edited: Apr 16, 2014
  7. craigiri

    craigiri Well-Known Member

    This may be another route:
    http://xenforo.com/community/resources/bd-cache.2763/

    I just turned off APC on my small VPS - for whatever reason it was not hitting....and also I have other caches for the wordpress side of things which work really well, so I may just install the XF one above and be done with it for now.

    It may be that multiple apc's or caches confuse things.....possible, I guess!

    Main thing is to check your page speed in googles tools over time and see if things are decent...that's all you can expect from a shared server or memory-restricted VPS.
     
  8. MattW

    MattW Well-Known Member

    It will depend on the web server software you are running. APC needs Apache to run in DSO mode to cache properly.
     

Share This Page