A technique for using long-lived, cached ColdFusion components as scoped proxies to handle request-specific state without per-request instantiation. By defining a setupRequest() method on each cached component and storing mutable state in the request scope (accessed via a $variables() indirection method), components can behave as if they have their own variables scope while remaining singleton instances managed by a DI container. This keeps the IoC container simple—dealing only with long-lived components—while still supporting dynamic, request-scoped behavior like URL event routing.
Sort: