public static method

Returns or sets the the class path cache used for mapping class names to file paths, or locating classes using Libraries::locate().


  • array $cache

    An array of keys and values to use when pre-populating the cache. Keys are either class names (which match to file paths as values), or dot-separated lookup paths used by locate() (which matches to either a single class or an array of classes). If false, the cache is cleared.



Returns an array of cached class lookups, formatted per the description for $cache.


	public static function cache($cache = null) {
		if ($cache === false) {
			static::$_cachedPaths = array();
		if (is_array($cache)) {
			static::$_cachedPaths += $cache;
		return static::$_cachedPaths;