After clearing the cache in Drupal 8 (via the UI) I got "The website encountered an unexpected error. Please try again later." error. It happened for the first time. I haven't introduced any heavy changes to the site, basically only created a field and some features (via the Features module).
I've found this error in the logs:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "password_migrate". in /.../app/vendor/symfony/dependency-injection/ContainerBuilder.php on line 800
To fix this was trying different things: clearing cache tables directly in the DB, trying drush rebuild (rebuild wasn't successful since it yelds the same error). After some time the error is different (and I don't know why):
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "ctools.paramconverter.tempstore" has a dependency on a non-existent service "user.shared_tempstore". in /.../app/vendor/symfony/dependency-injection/ Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 58
I can temporarily get the site back to life by loading {cache_container} table from the old backup. But the site breaks again after clearing the cache and the first error reapers in logs.
The site is basically broken. How can I restore it? How is the {cache_container} populated, so I can reverse the process and restore what's missing based on the cache? Thanks!