Admittedly, I don't really know what I am doing. However, this does seem to create var_data in xcache. In the examples, db is the default. Is there any reason not to set xcache as the default? Does this configuration appear reasonably sane?

Thanks in advance!

OS=CentOS
PHP= (out of box) 5.2.6
Web server=Lightthpt 1.4.22

I am also getting this error:
xcache_get(): xcache.var_size is either 0 or too small to enable var data caching, My xcache var settings are:

xcache.var_size  =            8M
xcache.var_count =             3
xcache.var_slots =            8K
xcache.var_ttl   =          3600
xcache.var_maxttl   =       3600
xcache.var_gc_interval =     300

settings.php=

//cache

 $conf['cache_inc'] = './sites/all/modules/cache/cache.inc';
    $conf['session_inc'] = './sites/all/modules/cache/session.inc';
    $conf['cache_settings'] = array(
      'engines' => array(
        'db' => array(
          'engine' => 'database',
          'server' => array(),
          'shared' => TRUE,
          'prefix' => '',
        ),
        'xcache' => array(
          'engine' => 'xcache',
          'server' => array(),
          'shared' => TRUE,
          'prefix' => '',
        ),

      ),

      'schemas' => array(
        'db' => array(
          // Engines:
          'db',
        ),
        'xcache' => array(
          // Engines:
          'xcache',
        ),
      ),

      'bins' => array(
        // Bin name     => Schema name.
        'default'       => 'xcache',
        'cache'         => 'db',
	'cache_form'    => 'xcache',
        'cache_page'    => 'xcache',
        'cache_filter'  => 'xcache',
        
      ),
    );
// end cache

Comments

doq’s picture

1. What is your Xcache extension version?

2. This is mine xcache configuration (as far as I remember it was working the last time I used it for testing):

[xcache]
; ini only settings, all the values here is default unless explained

; select low level shm/allocator scheme implemenation
xcache.shm_scheme =        "mmap"
; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size  =                64M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count =                 1
; just a hash hints, you can always store count(items) > slots
xcache.slots =                8K
; ttl of the cache item, 0=forever
xcache.ttl   =                 0
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval =           0

; same as aboves but for variable cache
xcache.var_size  =            64M
xcache.var_count =             100
xcache.var_slots =            8K
; default ttl
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300

xcache.test =                Off
; N/A for /dev/zero
xcache.readonly_protection = On
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path =    "/tmp/xcache"


; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory =   ""

; per request settings
xcache.cacher =               On
xcache.stat   =               On
xcache.optimizer =           Off

[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
xcache.coverager =          Off

; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""

3. Xcache as default? Well it should be tested. It also depends on the size of bins you will have. For example, if they will always be less then 100M then you may set Xcache cache size to e.g. 128M and you will receive xcache hit rate up to 99.9% easily. You might find more information in this thread - http://drupal.org/node/564116#comment-1993128.