-
Notifications
You must be signed in to change notification settings - Fork 13
Next: InvalidateAllCaches
Flushes all caches used in function or variable lookup.
void InvalidateAllCaches();
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.