You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Archie_UwU edited this page Dec 25, 2023
·
1 revision
Flushes all caches used in function or variable lookup.
Syntax
voidInvalidateAllCaches();
Remarks
YYToolkit Next internally caches function lookup results done by GetNamedRoutineIndex, and variable lookup results done by GetBuiltinVariableIndex. A red-black tree structure is used for speeding up lookup times for functions and built-in variables. The results are cached on first access, meaning the first call to a function loops through the game's internal array, while subsequent calls simply fetch from YYToolkit's cache.
If you manually manipulate the arrays, the cached entries may become invalid - it is advised to call this function in such cases to prevent lookups returning invalid results. Note that after a cache flush, everything has to be found from scratch again, so calls to built-in functions may take up to a few milliseconds, resulting in frame drops until all lookups become cached again.