How server-side caching works in Power Pages
In order to improve scalability and performance, Power Pages websites cache the data that is queried from Microsoft Dataverse. This caching is done on the application server for all business data and website metadata and is different from browser based or content delivery network caching of static resources.
Server side caching is done for two types of tables described below:
Metadata/configuration tables
Metadata/configuration tables represent all the tables that store website configuration information like web pages, web templates, content snippets, and others.
The following tables are considered as configuration tables. This list is fixed and can't be modified through any configuration.
Note
- The tables used for site configuration will depend if the site has been configured using the standard or enhanced data model. See Enhanced data model for more information.
- These tables cannot be modified.
System table | Enhanced data model virtual table | Standard data model table |
---|---|---|
powerpagesite | mspp_website | adx_website |
powerpagesitelanguage | mspp_websitelanguage | adx_websitelanguage |
powerpagecomponent | mspp_columnpermission mspp_columnpermissionprofile mspp_contentsnippet mspp_entityform mspp_entityformmetadata mspp_entitylist mspp_entitypermission mspp_pagetemplate mspp_pollplacement mspp_publishingstate mspp_publishingstatetransitionrule mspp_redirect mspp_shortcut mspp_sitemarker mspp_sitesetting mspp_webfile mspp_webform mspp_webformmetadata mspp_webformstep mspp_weblink mspp_weblinkset mspp_webpage mspp_webpageaccesscontrolrule mspp_webrole mspp_websiteaccess mspp_websitelanguage mspp_webtemplate |
adx_columnpermission adx_columnpermissionprofile adx_contentsnippet adx_entityform adx_entityformmetadata adx_entitylist adx_entitypermission adx_pagetemplate adx_pollplacement adx_publishingstate adx_publishingstatetransitionrule adx_redirect adx_shortcut adx_sitemarker adx_sitesetting adx_webfile adx_webform adx_webformmetadata adx_webformstep adx_weblink adx_weblinkset adx_webpage adx_webpageaccesscontrolrule adx_webrole adx_websiteaccess adx_websitelanguage adx_webtemplate |
All configuration table data is same for all users and is cached automatically. This configuration data cache for any table is updated automatically when any record is changed. Automatic cache update has a service level agreement of 15 minutes. Any change done for a configuration record would be automatically available on the website within 15 minutes.
However, in case the record changes are needed immediately, you can explicitly clear the cache using following options;
Option | Details |
---|---|
Design studio | Selecting the Preview option on the design studio will clear the cache. |
/_services/about page on the website |
Utilize the clear config or clear cache option by navigating to the website with '/_services/about' appended to the URL of the website. In order to view these options, user should have a webrole with all website access permissions assigned. |
Note
Updates to the data in configuration tables or invoking the clear cache or config actions should be performed during non-peak hours. Frequent or too many table changes may adversely affect website performance.
All configuration tables must be enabled for change notification in the organization. Change notification is set correctly by default and shouldn't be modified.
Data tables
Data tables represent all the Dataverse tables that store business data displayed on the website. This data is typically cached per user except in certain cases like anonymous users or tables with global permission. Also only the data accessed by user on the website is cached and not the data for whole table.
This cache is updated through several mechanisms described below:
Any record for a table (or a related table) is created, updated, or deleted on the website by any website user. The action will instantaneously clear the cache for all the website users for that specific table.
Cache is cleared automatically within 15 minutes even if no changes are made.
Cache is cleared manually through following options:
Option Details Design studio Selecting the Preview option on the design studio will clear the cache. /_services/about
page on the websiteUtilize the clear config or clear cache option by navigating to the website with '/_services/about' appended to the URL of the website. In order to view these options, user should have a webrole with all website access permissions assigned.
Note
The clear cache option should be seldom used as it clears cache for all data tables as well as configuration tables and can cause temporary slowness. For live site with heavy usage, this can lead to users facing performance issues.
FAQs
Can I change the cache refresh duration from 15 minutes to a lesser duration?
No. SLA for cache refresh remains 15 minutes. Any changes from Dataverse will reflect on the website within 15 minutes for both data tables and configuration tables.
I'm using plugins or workflows to update data in other tables and need these data changes to reflect immediately on my website.
This design approach isn't recommended. Except the primary record where the create or update action is triggered, data reflection from Dataverse to websites is never guaranteed to be immediate.
Is there any difference in caching between capacity-based websites and add-on portals?
No.
How long does it take for changes to reflect from a website to Dataverse?
Immediately, as long as the update changes a primary record and isn't based on indirect changes to data using post operation plugins or workflows.