OpenSimulator · EN

Script engines: runtime files and caches

YEngine, ScriptEngines, compilation and precautions before deleting any files.

Reference: OpenSimulator 0.9.3.1. Check the actual loaded engine. ScriptEngines files and persistent assets are not necessarily disposable caches.

Distinguish cache from script state

Script engines use in-memory structures, compilation results and sometimes persistent files. Not all these files are disposable copies. Script state may be required to resume execution correctly after restart.

YEngine ScriptEngines directory

XMREngine.cs reads ScriptEnginesPath, falling back to ScriptBasePath and then ScriptEngines. YEngine creates a Yengine subdirectory followed by the region UUID. It stores files used by script instances there. This directory is not equivalent to Flotsam's assetcache.

Compilation and compute resources

Recompiling scripts after changes can consume CPU and I/O. Deleting script folders without an appropriate procedure can also destroy state files used on restart. Deletion should never be recommended as an automatic fix for a slow region.

yeng commands and module scope

XMREngine.cs registers a yeng console-command family. This does not mean every yeng command clears a cache. Check help on the deployed engine version before operations; console commands do not replace diagnosing scripts and event queues.

Script assets and region data elsewhere

Script source and inventory references belong to assets, objects and inventory systems; compilation and execution belong to the engine. Do not confuse the YEngine directory with the prim database, asset store or OAR/IAR archives.

Recommended maintenance

Before touching YEngine directories, identify the active engine, inspect logs, back up scenes and needed state, then test outside production. The reviewed code does not establish a universal clear script cache command.

Conceptual directory tree: do not delete this as though it were an asset cache.

ScriptEngines/
  Yengine/
    <UUID_DE_REGION>/
      ...fichiers du moteur et états de scripts...

Managing this cache: practical steps

Managing without deleting script state

Start with YEngine logs, engine health, active script count and CPU/RAM. yeng commands are engine-specific and must be checked using help for the deployed version; no universal ScriptEngines purge command was verified. Restarting or mass recompilation can create significant load.

Risk of losing script state

Before changing ScriptEnginesPath, ScriptBasePath or the Yengine directory, preserve relevant state and test restoration. Files generated by YEngine are not necessarily safe to delete without affecting script resume. Never suggest rm -rf ScriptEngines as routine maintenance.

OpenSimulator source references

Related guides