deriveRetentionKey โ
Object deriveRetentionKey({required dynamic module, required dynamic context, Object? explicitKey, Object? parentKey, dynamic args, Map<String, Object?>? extras})Derive a stable cache key for a Module within the retention system.
The key uniquely identifies a ModuleController within the ModuleRetainer cache. Identical keys cause the retainer to return the same cached controller.
Resolution Order โ
- If
explicitKeyis provided, it is returned as-is. - If the
moduleimplements RetentionIdentityProvider, its RetentionIdentityProvider.buildRetentionIdentity is called. A non-null result is returned directly. - Otherwise a composite hash is computed from the module type, the enclosing route,
args,parentKey, andextras.