drupflare/worker - v1.0.4
    Preparing search index...

    Variable BOOT_IMAGE_REKEY_PHPConst

    BOOT_IMAGE_REKEY_PHP: "\nuse Drupal\\Core\\Cache\\CacheCollector;\nuse Drupal\\Core\\Site\\Settings;\nuse Drupal\\drupflare\\Cache\\CfwMemoryBackend;\n\n// a restored heap carries the bake site's settings, state cache, memory cache and random state; each\n// step makes one of them this site's. A step that throws is reported and the caller drops the heap\n$out = ['steps' => [], 'errors' => []];\n$step = function (string $name, callable $fn) use (&$out) {\n\ttry {\n\t\t$fn();\n\t\t$out['steps'][] = $name;\n\t} catch (Throwable $e) {\n\t\t$out['errors'][] = $name . ': ' . get_class($e) . ': ' . $e->getMessage();\n\t}\n};\n\n// reads settings.php again, which the boot wrote for this site: the salt, the origin and every\n// setting the context does not key on\n$step('settings', function () {\n\t$loader = $GLOBALS['__pw_autoloader'];\n\tSettings::initialize('/drupal', 'sites/default', $loader);\n});\n\n// values the bake computed from its salt and key, such as an anonymous user's permissions hash\n$step('memory', function () {\n\tDrupal::service('cache.memory')->deleteAll();\n});\n\n// the bins kept in memory by default hold the bake's entries, and a tag counter cannot tell them from\n// this site's: two sites with the same number of saves read the same count\n$step('memory bins', function () {\n\t$container = Drupal::getContainer();\n\tforeach ($container->getServiceIds() as $id) {\n\t\tif (str_starts_with($id, 'cache.') && $container->initialized($id)) {\n\t\t\t$service = $container->get($id);\n\t\t\tif ($service instanceof CfwMemoryBackend) {\n\t\t\t\t$service->deleteAll();\n\t\t\t}\n\t\t}\n\t}\n});\n\n// the generator state is in the heap, so every replay would otherwise draw the bake's sequence\n$step('random', function () {\n\tmt_srand(unpack('V', random_bytes(4))[1]);\n});\n\n// a collector holds what the bake computed, State's private key among it, and some of it is not yet\n// persisted: the first request's resetter would write it into this site's cache under this site's\n// current tag checksums, so it would read as valid. The bake's active trail for a route did exactly\n// that\n$step('collectors', function () {\n\t$container = Drupal::getContainer();\n\tforeach ($container->getServiceIds() as $id) {\n\t\tif ($container->initialized($id)) {\n\t\t\t$service = $container->get($id);\n\t\t\tif ($service instanceof CacheCollector) {\n\t\t\t\t$service->reset();\n\t\t\t}\n\t\t}\n\t}\n});\n\n// an image keyed without the config rows also holds the config objects and entities the bake read,\n// and neither is validated against this site's database again\nif (__CFW_RESET_CONFIG__) {\n\t$step('config', function () {\n\t\tDrupal::configFactory()->reset();\n\t});\n\t$step('entities', function () {\n\t\tDrupal::service('entity.memory_cache')->deleteAll();\n\t});\n}\n\necho json_encode($out);\n"