xcache config for dummies (like me)

mrb1972

Active member
Can anyone tell me the best way to setup the cache setting in config for xcache, I dont really understand it to well, is it best to configure the Cache Front-end and Back-end or just one of them

Any advise would be great

thanks
 
I have this.

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_';

I'm just using simple file caching though as I'm on a shared server.
 
I use this cache config in XenForo configuration for XCache:
Code:
$config['cache'] = array(
    'enabled' => true,
    'frontend' => 'Core',
    'frontendOptions' => array(
            'caching' => true,
            'automatic_serialization' => false,
            'cache_id_prefix' => 'you_prefix_',
            'lifetime' => 18000
    ),
    'backend' => 'Xcache',
    'backendOptions' => array(),
    'cacheSessions' => true
);
 
When I set the cache to file I had thousands of files in my cache_dir.

Adding this:

Code:
$config['cache']['backendOptions']['hashed_directory_level'] = '1';

Put them all neatly into hash dirs decreasing seek and destroy times, something to consider if your site is active.
 
We are on a good sized VPS, however the host is telling us we cant use the caching feature because;

To install one, they need to disable Automatic Updates, mod_suphp will be changed with mod_php and these are not recommended due to high security risks.

Any suggestions?
 
Do they just manage the VPS for you? Do you have any other sites on the VPS?

I have a VPS, and to get Xcache working, I had to change from suPHP to FCGI for the PHP handler, as APC/Xcache doesn't work with suPHP.
 
If it is the only site on the VPS, there is no need to be running suPHP, you can run in DSO (mod_php), and Xcache will work fine (as there is no one else on the site which could be exploited if your own site was hacked).

http://boomshadow.net/tech/php-handlers/

Are you running a control panel on the VPS (Cpanel or Plesk)?
 
I have this.

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_';

I'm just using simple file caching though as I'm on a shared server.

Neither, its a custom CP, I wonder if I can just run this, if it would help any.
 
We are on a good sized VPS, however the host is telling us we cant use the caching feature because;

To install one, they need to disable Automatic Updates, mod_suphp will be changed with mod_php and these are not recommended due to high security risks.

Any suggestions?

The security risk statement would be true if it was a server that was being used to provide hosting to a number of customers but if the VPS is being used just for your own websites then I dont see how it would pose a security risk.

I use DSO and I feel its a little faster then other handlers and I use APC with it. It does make it harder to pin point where the problem is is you have your server stretched at peak times but thats one reason why its faster amongst others. It goes very well with APC or Xcache. I use APC. If you want to keep things simple and have a little extra RAM to spare then go with FCGI.

Most server management companies would tell you the same thing that it would be a security risk which is correct in a shared environment as people could dos each others cache and make page loads even slower and even wipe out each others caches from the RAM but these things mean nothing if its not a shared server. Server management companies get very few customers like us lot who are not hosting companies and use the servers for their own sites.

Thats what I understand and I am not always right ;) Some one please correct me if I am wrong :)
 
You can use dso and get speed+security at the same time by using mod_ruid

It is similar to suphp in terms of security. Not as secure as suphp but more secure than mod_php. You can also use caches with it unlike suphp

I'm using mod ruid + xcache on my server for a long time. It is fast because it is dso and I have no problems so far.
 
You can use dso and get speed+security at the same time by using mod_ruid

It is similar to suphp in terms of security. Not as secure as suphp but more secure than mod_php. You can also use caches with it unlike suphp

I'm using mod ruid + xcache on my server for a long time. It is fast because it is dso and I have no problems so far.
I set @Volion up with mod_ruid2 and Xcache a few months back now. No issues with it, and I've had it on my server for almost 18 months.
 
Top Bottom