Hello,

If I set a min cache lifetime on performance page, cache begins to give frequently a:

Fatal error: Using $this when not in object context in /var/www/html/sites/all/modules/cache/cache.inc on line 55

Generally it disappears after few refreshes for the very page and come again soon for another.

Then I changed line 55 from this:

$this->flush($cache_flush);

to this:

if(isset($this)) {
  $this->flush($cache_flush);
}

as a temporary solution.

And if I use low_priority_updates = 1 for MySQL, situation seems to worsen drastically.

Any suggestions?

Xcache is OK other than this Drupal instance and we are on D 6.13 with the config:

$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-engine' => array(
          'engine' => 'database',
        ),
	'xc-engine' => array(
          'engine' => 'xcache',
        ),
      ),
      'schemas' => array(
        'db-schema' => array(
          'db-engine',
        ),
        'xc-schema' => array(
          'xc-engine',
        ),
      ),
      'bins' => array(
        'default' => 'db-schema',
		'cache' => 'xc-schema',
        'cache_form'    => 'xc-schema',
        'cache_filter'  => 'xc-schema',
      ),
    );

Comments

doq’s picture

Please try changing line:

$this->flush($cache_flush);

to

$cache->flush($cache_flush);

doq’s picture

Status: Active » Needs review
chawl’s picture

Status: Needs review » Reviewed & tested by the community

Yes, error seems to disappear even with a high load simulation.

Thank you for your fast consideration :)

doq’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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