lithium\g11n\Message::cache()

public static method

Returns or sets the page cache used for mapping message ids to translations.

Parameters

  • array $cache

    A multidimensional array to use when pre-populating the cache. The structure of the array is scope/locale/id. If false, the cache is cleared.

Returns

array

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

Source

	public static function cache($cache = null) {
		if ($cache === false) {
			static::$_cachedPages = [];
		}
		if (is_array($cache)) {
			static::$_cachedPages += $cache;
		}
		return static::$_cachedPages;
	}