You can use the webdesign siteconfig cache to hold data that doesn’t generally change from page to page - eg the structure of a site menu (except for any ‘selected’ cell). You could build this yourself using the adhoc cache, but it may be hard to get all the eventmasks for invalidations right.
The webdesign->siteconfig returns cached configuration that will be originally provided by GetcacheableSiteConfig. Specifically, this cache will be invalided by
- any changes to the webdesign source code (or its dependencies)
- any changes to data in the site (file sor folders)
- updates to any moduledefinition or site profile
And the cached data is stored per site (ie, all files and folders in the same site will share the cached siteconfig)
Override the GetCachableSiteConfig function to return the data that doesn’t change per site, for example:
The GetCachableSiteConfig function may return a cell named eventmasks containg a string array. These will be added to the list of eventmasks associated with this key.