$_backends
$_backends : array<mixed,\Doctrine\Common\Cache\CacheProvider>
A list of all backends created by _create_backend(). They will be automatically shut down when the module shuts down. They are indexed by their name.
This is the NAP caching module. It provides the basic management functionality for the various backend databases which will be created based on the root topic of the NAP trees.
The actual handling of the various dbs is done with nav/backend.php, this class is responsible for the creation of backend instances and invalidation for NAP cache objects. (Which implies that it is fully aware of the data structures stored in the cache.)
All entries are indexed by their Midgard Object GUID. The entries in the NAP cache basically resemble the arrays within the NAP backend node/leaf cache
NAP caches can be shared over multiple sites, as all site specific data (like site prefixes) are evaluated during runtime.
Most of the cache update work is done in midcom_helper_nav_backend, so you should look there for details about the caching strategy.
_create_backend(string $name, array $config) : \Doctrine\Common\Cache\CacheProvider
Creates an instance of the handler described by the configuration passed to the function.
The configuration array must include the configuration parameters driver and directory, as outlined in the midcom_services_cache_backend class documentation.
All backends will be collected in the $_backends array, indexed by their name.
Any duplicate instantiation will be intercepted, throwing a critical error.
string | $name | The name of the backend, must be unique throughout the system. |
array | $config | The configuration of the backend to create. It must contain the key 'driver', which indicates which backend to use. |
The new backend.