namespace ZB.MOM.WW.OtOpcUa.Commons.Engines;
///
/// Optional capability an may implement when it caches
/// compiled scripts and needs an apply-boundary drop. The production
/// RoslynVirtualTagEvaluator caches one collectible
/// per compiled expression; without a
/// drop on each config-apply generation those ALCs accrete forever across script edits (every
/// republish roots a new one). VirtualTagHostActor casts its injected evaluator to this
/// interface and calls at each apply so stale ALCs are
/// reclaimed — mirroring how ScriptedAlarmEngine clears its compile cache per generation.
/// Evaluators with no cache (e.g. ) simply don't implement
/// it, and the host actor's null-conditional cast makes the call a no-op.
///
public interface IScriptCacheOwner
{
/// Drops every cached compiled script, disposing each so its collectible
/// AssemblyLoadContext unloads. Called at each config-apply generation boundary.
void ClearCompiledScripts();
}