# `MishkaCmsCore.Runtime.States.CompileFailureState`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/runtime/states/compile_failure_state.ex#L5)

O(1) ETS record of runtime modules that failed to compile, keyed by module atom.

Lets the compile hot path short-circuit a known-broken module — `failed?/1` is a
pure `:ets.member` lookup, so a repeatedly-requested broken page is compiled once
(and caught once) rather than recompiled-and-rescued on every request. A successful
compile clears the entry; an `:update` recompile bypasses the cache and refreshes it.

`{module, :offline}` is an Error Page whose `:offline` entry compiled but raised when it was drawn;
the module stays loaded for its other entries.

`{MishkaCmsCore.Runtime.JsHook, hook_id, bundle}` is a JS hook left out of a site's JavaScript
bundle — see `MishkaCmsCore.Runtime.Compilers.JavaScriptCompiler.left_out/1`.

Read by `MishkaCmsCore.Runtime.Handlers.ModuleCompilerHandler`,
`MishkaCmsCore.Runtime.RuntimeStatus` and `MishkaCmsWeb.ErrorHTML.offline_page/1`.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear`

Forget a module's failure (e.g. after it compiles cleanly).

# `clear_matching`

Forget every failure whose key matches `pattern`, an `:ets` match pattern.

# `failed?`

Whether `module` is recorded as failed (fast hot-path check).

# `matching`

Every recorded `{key, reason}` whose key matches `pattern`, an `:ets` match pattern.

# `reason`

The recorded failure reason for `module`, or `nil`.

# `record`

Record that `module` failed to compile, with its reason.

# `start_link`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
