Context cache entries can override site configuration settings and are responsible for
loading the various listings and maps in the modX class, including resourceMap, aliasMap,
and eventMap. It can also be used to setup or transform any other modX properties.

Parameters

Name

Type

Description

$key

string

The modContext key to be cached.

$options

array

Options for context settings generation.

Returns

Type

Description

array

An array containing all the context variable values.

Details

Todo

Further refactor the generation of aliasMap and resourceMap so it uses less memory/file size.

The php file mode to write in. Defaults to 'wb'. Note that this method always uses a (with b or t if specified) to open the file and that any mode except a means existing file contents will be overwritten.