Invalidation and reloading

These functions allow platform caches to be invalidated. Use them carefully, as performance will be impacted by overuse, and stale data will be used if they’re not called at the right time.

In general, the cache will be invalidated immediately for this thread. Other threads will see invalidated caches the next time the thread starts a request or background processing.

function O.reloadUserPermissions()

Invalidate all cached user permission information. Use when you’ve implemented a custom permissions system, and permissions have changed.

function O.reloadJavaScriptRuntimes()

Invalidate all current plugin JavaScript runtimes for this application. The plugin code will be loaded into fresh JavaScript runtimes as soon as possible.

Avoid using this function. It should not be necessary for most plugins. Using an InterRuntimeSignal is likely to be more appropriate.

function O.reloadNavigation()

Invalidates the cached left hand navigation for all users.

function O.reloadPlatformDynamicFiles()

Invalidates the platform’s dynamic files for all users. These files include the dynamically generated CSS, to which plugins can append CSS with hMainApplicationCSS.