Thanks for testing. Now what we need is to see what things look like when there's no error:
Change this (briefly):
if (!$this->set($cacheKey, $entries, $lifetime, $options)) {
$this->modx->log(modX::LOG_LEVEL_ERROR, "Error caching lexicon topic " . $cacheKey);
$this->modx->log(modX::LOG_LEVEL_ERROR, 'LIFETIME: ' . $lifetime);
$this->modx->log(modX::LOG_LEVEL_ERROR, 'ENTRIES: ' . print_r($entries, true));
$this->modx->log(modX::LOG_LEVEL_ERROR, 'OPTIONS: ' . print_r($options, true));
}
to this:
if (!$this->set($cacheKey, $entries, $lifetime, $options)) {
$this->modx->log(modX::LOG_LEVEL_ERROR, "Error caching lexicon topic " . $cacheKey);
// $this->modx->log(modX::LOG_LEVEL_ERROR, 'LIFETIME: ' . $lifetime);
// $this->modx->log(modX::LOG_LEVEL_ERROR, 'ENTRIES: ' . print_r($entries, true));
// $this->modx->log(modX::LOG_LEVEL_ERROR, 'OPTIONS: ' . print_r($options, true));
} else { /* non-error condition */
$this->modx->log(modX::LOG_LEVEL_ERROR, 'NORMAL LEXICON CACHE');
$this->modx->log(modX::LOG_LEVEL_ERROR, 'LIFETIME: ' . $lifetime);
$this->modx->log(modX::LOG_LEVEL_ERROR, 'ENTRIES: ' . print_r($entries, true));
$this->modx->log(modX::LOG_LEVEL_ERROR, 'OPTIONS: ' . print_r($options, true));
}
As soon as you get a hit (make sure it says 'NORMAL' in the log), cut and paste one of the non-error results (all four error messages) into a new, empty chunk for reference (make sure it says 'NORMAL' in the log), then change the code back to my original.
The next time a real error occurs (it won't say NORMAL), paste all three error messages into the same chunk and see if you can spot any differences between the normal and error sections.