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 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.
- 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|
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;
|Design studio||Selecting the Preview option on the design studio will clear the cache.|
||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.|
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 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/aboutpage 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.
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.
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?
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.