xcache config for dummies (like me)

$config['cache']['backend'] = 'xcache';

This doesn't work for me and i'm getting this error on my forum:
An unexpected error occurred. Please try again later.
And i have this in server error log:
ErrorException: xcache_get() [<a href='function.xcache-get'>function.xcache-get</a>]: XCache var cache was not initialized properly. Check php log for actual reason - library/Zend/Cache/Backend/Xcache.php:95
Any solution?
 
This doesn't work for me and i'm getting this error on my forum:
An unexpected error occurred. Please try again later.
And i have this in server error log:
ErrorException: xcache_get() [<a href='function.xcache-get'>function.xcache-get</a>]: XCache var cache was not initialized properly. Check php log for actual reason - library/Zend/Cache/Backend/Xcache.php:95
Any solution?
Is the xcache module enabled? Have you checked your php info page from the ACP to confirm it is set up and you have given it a defined amount of memory?
 
Is the xcache module enabled? Have you checked your php info page from the ACP to confirm it is set up and you have given it a defined amount of memory?

Yes i've checked php info page and seems fine. What do i have to check for amount of memory?
 
below are all of the XCache settings in my php configuration:

---
with XCache v3.0.3, Copyright (c) 2005-2013, by mOo
with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo
XCache
XCache Version => 3.0.3
xcache.coredump_directory => no value => no value
xcache.disable_on_crash => Off => Off
xcache.experimental => Off => Off
xcache.test => Off => Off
XCache Cacher
XCache Cacher Module => enabled
xcache.admin.enable_auth => On => On
xcache.allocator => bestfit => bestfit
xcache.cacher => On => On
xcache.count => 1 => 1
xcache.gc_interval => 0 => 0
xcache.mmap_path => /dev/zero => /dev/zero
xcache.readonly_protection => Off => Off
xcache.shm_scheme => mmap => mmap
xcache.size => 0 => 0
xcache.slots => 8K => 8K
xcache.stat => On => On
xcache.ttl => 0 => 0
xcache.var_allocator => bestfit => bestfit
xcache.var_count => 1 => 1
xcache.var_gc_interval => 300 => 300
xcache.var_maxttl => 0 => 0
xcache.var_namespace => no value => no value
xcache.var_namespace_mode => 0 => 0
xcache.var_size => 0 => 0
xcache.var_slots => 8K => 8K
xcache.var_ttl => 0 => 0
XCache
XCache Cacher
XCache Cacher

What am i missing?
 
Try (depending on how much memory you have)
Code:
xcache.size =256M
xcache.var_size =256M

in your php.ini.
The .var_size should set up for caching sessions (which I would not recommend doing with xCache but use APC/APCu).
 
The .var_size should set up for caching sessions (which I would not recommend doing with xCache but use APC/APCu).
xcache.var_size is enable variable cache. XenForo use this. Not for caching sessions only. This cache XenForo use for caching various variables such as smiles, styles, thread prefixes and etc.
And not necessarily enable caching sessions (enabling by option in library/config.php).

xcache.size enable opcode cache. It's using by any php script, not XenForo only.
 
xcache.var_size is enable variable cache. XenForo use this. Not for caching sessions only. This cache XenForo use for caching various variables such as smiles, styles, thread prefixes and etc.
And not necessarily enable caching sessions (enabling by option in library/config.php).

xcache.size enable opcode cache. It's using by any php script, not XenForo only.
It's been a while since I used it... I know it had the option to do both... and I was mistaken.. the recommendation is to not write sessions to APC/APCu. I strictly use ZEND OpCache and memcached now.
 
  • Like
Reactions: rdn
Top Bottom