ObliviousHarmony and matticbot Autoloader: Preemptively load unknown plugins from cache (#17667)
d6d89b7 Dec 8, 2020
Autoloader: Preemptively load unknown plugins from cache (#17667)
Autoloader: Cache active plugins in `jetpack_autoloader_plugin_paths` transient

As a way to avoid unnecessary resets when loading `mu-plugins` or those loaded by code, we're now utilizing a transient cache. On successful shutdown (if `plugins_loaded` action completed) we save the active plugin list to the transient if it has changed. This cache is then used on initialization to consider any unknown plugins. We aim for eventual consistency here, as plugins will be present (harmlessly) in the classmap for the first request after they're deactivated.

- Added transient cache
- Refactored plugin location, handling, and added a container to simplify dependency management
- Added integration tests to check important autoloader use-cases

Committed via a GitHub action: https://github.com/automattic/jetpack/runs/408803641
d6d89b7