Closed f1-outsourcing closed 1 year ago
Yes something like this fixes it, not sure if it is necessary to crc32() the server name.
protected function getAll(): array
{
$list = [];
$prefix = 'sc_'.$_SERVER['SERVER_NAME'].'_';
foreach (new APCUIterator('/^'.$prefix.'/') as $item) {
$key = str_replace($prefix, '', $item['key']);
$value = unserialize($item['value']);
$list[$key] = $value;
}
return $list;
}
/**
* Get the key name of a cache.
*
* @param string $key The key of a cache.
*
* @return string
*/
private function getKeyName(string $key): string
{
$prefix = 'sc_'.$_SERVER['SERVER_NAME'].'_';
return $prefix . $key;
}
Maybe fix this?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue was closed because it has been inactive for 14 since being marked as stale.
apcu part is not handling multiple websites well. See https://github.com/terrylinooo/cache-master/issues/7
This is how the 'w3 total cache' plugin uses apcu. I guess if you incorporate something like the website name with using the cache, this should be fixed.