Jet\Autoloader_Cache

This is a cache autoloader container.

Methods Overview

Method Importance
public static init(
Autoloader_Cache_Backend $backend
): void
Registers the backend. Only after this method is called is the cache functional.

If initialization is not done, Autoloader_Cache methods can be called, but the cache is not functional.
public static isActive(
): bool;
Indicates whether the cache is active. The backend must take into account both the value of SysConf_Jet::isCacheAutoloaderEnabled() and possibly other state of affairs. For example, if Redis was used as the backedn, then Redis availability and connectivity must be evaluated.
Simply put, both the configuration and the technical ability to use the cache itself need to be evaluated.

If no initialization has occurred, it always returns false.
public static load(
): array|null;
Returns an associated array (map), where the key is the class name (full, including NS) and the value is the path of the corresponding script.

If the cache is not "warmed up", it returns null.

If no initialization has occurred, it always returns null.
public static save(
array $map
): void;
Saves the map to the cache.
public static reset(
): void;
Devalues the cache.
Previous chapter
Cache
Next chapter
Jet\Autoloader_Cache_Backend