This function can be used to force the cache for a particular include to expire. This is useful in the case of a change in the page display, such as adding new metadata fields, or if the user has saved a new query, or altered which links are viewable.
If the value for 'includeName' is null, or an empty string, then the entire cache will be eliminated. This is useful when all includes for a particular page are placed into the same cache, and need to be expired at the same time.
See Keywords Versus Functions for more information
Takes two required parameters and two optional parameters. For example:
forceExpire(includeName, scope [, cacheName, key])
|includeName||The name of the dynamic html element to evaluate.|
|scope||Set to 'session' if each user should see different html, or 'application' if all users will see the same thing.|
|cacheName||Optional: if you want to place this data into a named cache instead of the default cache. If an empty string is passed, it will cache the include into the default cache for the session.|
|key||Optional: if you do not want automatic name-scoping of your cache to prevent conflicts, you can specify a unique key here.|
This can be used as a replacement for the 'std_page_begin' include. It will verify if the user executed one of the standard service calls to modify the links on the standard left navigation bar (saving a query, altering the portal design). If so, the cached html for the standard page begin will be invalidated. Then, the next 'cacheInclude' function will reevaluate the include, and place it back into the cache.
<$if strEquals(IdcService, "PNE_SAVE_QUERY") or strEquals(IdcService, "PNE_UPDATE_PORTAL_INFO")$> <$forceExpire("std_main_page_begin", "session", "", "std_main_page_begin")$> <$endif$> <$cacheInclude("std_main_page_begin", "session", 600, "", "std_main_page_begin")$>