Why not just use XCache by itself? It has a variable cache.
XCache is both an opcache and a data cache.
I'd recommend adding it to config.php if you've configured the data cache correctly.
Any examples for correct configuration?
I guess whatever in XF FAQ isn't enough.
xcache.shm_scheme = "mmap"
xcache.size = 512M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0
xcache.var_size = 8M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.var_namespace_mode = 0
xcache.var_namespace = ""
xcache.readonly_protection = Off
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
[xcache.coverager]
xcache.coverager = Off
xcache.coverager_autostart = On
xcache.coveragedump_directory = ""
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'XCache';
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend']='Xcache';
extension = "xcache.so"
xcache.admin.enable_auth = On
xcache.admin.user = "USERNAME"
xcache.admin.pass = "MD5PASSWORD"
xcache.shm_scheme = "mmap"
xcache.size = 256M
xcache.count = 14
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0
xcache.var_size = 32M
xcache.var_count = 14
xcache.var_slots = 1K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.var_namespace_mode = 0
xcache.var_namespace = ""
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory = ""
xcache.coredump_type = 0
xcache.disable_on_crash = Off
xcache.experimental = Off
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
xcache.coverager = Off
xcache.coverager_autostart = On
xcache.coveragedump_directory = ""
Thanks. We have everything the same except xcache.count, which is based on CPU cores as I know that. Is there a reason for 14? I was thinking raising it to 8, although I'm not sure.This is my config.php using Xcache (storing settings as well)
PHP:$config['cache']['enabled'] = true; $config['cache']['frontend'] = 'Core'; $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_'; $config['cache']['cacheSessions'] = true; $config['cache']['backend']='Xcache';
and my Xcache settings (VPS with 8GB RAM)
Code:extension = "xcache.so" xcache.admin.enable_auth = On xcache.admin.user = "USERNAME" xcache.admin.pass = "MD5PASSWORD" xcache.shm_scheme = "mmap" xcache.size = 256M xcache.count = 14 xcache.slots = 8K xcache.ttl = 0 xcache.gc_interval = 0 xcache.var_size = 32M xcache.var_count = 14 xcache.var_slots = 1K xcache.var_ttl = 0 xcache.var_maxttl = 0 xcache.var_gc_interval = 300 xcache.var_namespace_mode = 0 xcache.var_namespace = "" xcache.readonly_protection = Off xcache.mmap_path = "/dev/zero" xcache.coredump_directory = "" xcache.coredump_type = 0 xcache.disable_on_crash = Off xcache.experimental = Off xcache.cacher = On xcache.stat = On xcache.optimizer = Off xcache.coverager = Off xcache.coverager_autostart = On xcache.coveragedump_directory = ""
Thanks. We have everything the same except xcache.count, which is based on CPU cores as I know that. Is there a reason for 14? I was thinking raising it to 8, although I'm not sure.
And xcache.var_size that is 32M at yours, why so big?
Mine is set to 14 because I have access to 14 CPU cores
View attachment 49079
I also have my xcache.var_size at 32M because I have a few other sites (phpBB3) using it as well. It's only using 6M, but doesn't hurt to have 32M
It's telling you that there is nothing being added to the user cache. Are you using it to store sessions as well?
Yes, but I'm using a test area, so there are only 3-4 people who are using the system.
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'xcache';
I get logged out from the system at rendom times (while I'm translating). Is tihs connected to cacheSessions?
We use essential cookies to make this site work, and optional cookies to enhance your experience.