Best Practice and Performance
Module/WebApp Caching
4min
note experimental you can improve performance of your website by implementing caching on your module/webapp calls how do i use it? add a new parameter to your module/webapp include of cache 'true' example {% include 'webapp' id '9' layout 'custom' cache 'true' %} how does it work? caching works by generating a cache key if the cache key value is the same each time the include loads, then the content will be loaded from cache if that cache key value changes, then the content is loaded from the database the cache key is generated using the following information module/webapp id most recent delete date of an item in the module/webapp so when an item is deleted, the content is reloaded to remove it most recent update date of an item in the module/webapp so when an item is updated, the latest version is loaded layout name in case you have multiple calls to a module/webapp on a page, this ensures the different layout is loaded in the correct the place url parameters this needs to be taken into account for when search is being used, so the content returned is the relevant results why is it experimental? this feature is new to siteglide, and there are some situations where it may not work for example we need to add more information to the cache key, such as sort type and per page it's unclear how this will perform if there's a lot of nested datasources in the layout, or calls to other modules/webapps/data what if it doesn't work? remove the cache parameter, and you will revert to loading from the database each time get in touch, and we'll investigate why it didn't work for your use case, and we'll then be able to apply improvements across the board to the feature