I'm getting this from file.php

Notice: Undefined index: cache in /path/to/drupal/sites/all/modules/cacherouter/engines/file.php on line 15

Affected line is:

// Assign the path on the following order: bin specific -> default specific -> /tmp/filepath
$this->fspath = $conf['cacherouter'][$bin]['path'];

Seems $bin contains the wrong data. From what I can tell it ought to contain 'default' but seems to contain the actual cache "table" name instead?

Settings file is like this:

$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'file',
    'shared' => TRUE,
    'prefix' => '',
    'path' => '/tmp/filecache/drupaler',
    'static' => FALSE,
    'fast_cache' => FALSE,
  ),
);

I think bin is supposed to be the array key?

Comments

greg.harvey’s picture

For information, call stack is:

Call Stack
#	Time	Memory	Function	Location
1	0.0000	45284	{main}( )	../index.php:0
2	0.0003	66736	drupal_bootstrap( )	../index.php:16
3	0.0421	124804	_drupal_bootstrap( )	../bootstrap.inc:947
4	0.0421	124804	variable_init( )	../bootstrap.inc:1000
5	0.0421	124804	cache_get( )	../bootstrap.inc:438
6	0.0421	124804	CacheRouter->get( )	../cacherouter.inc:27
7	0.0421	124804	CacheRouter->__init( )	../CacheRouter.php:34
8	0.0422	130656	fileCache->__construct( )	../CacheRouter.php:29
slantview’s picture

Status: Active » Fixed

Fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.