With content cache-controls, you can modify the cache behavior of the browser. The cache-control is used on endpoints handled by the repository servic...
With content cache-controls, you can modify the cache behavior of the browser. The cache-control is used on endpoints handled by the repository service. This functionality is disabled by default and can be enabled by modifying the files Repository.exe.conf and capabilities.json, followed by a restart of the Qlik Sense Service Dispatcher and the Qlik Sense Repository Service.
Cache-control for endpoints handled by the repository service was introduced in Qlik Sense Enterprise on Windows February 2022 (Patch 1). In the May 2022 release further enhancements were made to extend caching policies for requests specific to the Hub service. Upgrade Qlik Sense to make use of the new features.
In this article, we walk you through modifying the cache control policy and how to apply it globally across your Qlik Sense Enterprise on Windows environment.
Before modifying the cache-controls
Please note the following before modifying cache control headers:
Enable the feature
The feature is disabled by default. For details, see Configuring content cache-control.
- Open C:\Program Files\Qlik\Sense\Repository\Repository.exe.conf
- Modify the following key and set it to true:
<add key="ContentCacheControl" value="true" />
Save the file.
- Open C:\Program Files\Qlik\Sense\CapabilityService\capabilities.json
- Add the following flag:
Save the file.
- Restart the Qlik Sense Repository Service and Qlik Sense Dispatcher Service
Modify cache-controls in the Qlik Sense Management Console
- After enabling cache-control, open the Qlik Sense Management Console
- Go to Content Libraries
- Open the Content Library you wish to configure
- In the Associated Items menu, select Content cache-controls
- Click Link new content cache control
- Configure the cache-controls as per Content cache-controls and click Add
The cache control will automatically be linked.
- Restart the Qlik Sense Service Dispatcher and Qlik Sense Repository Service
These are the predefined cache-control header values:
"0: Normal", -> public, max-age=3600
"1: MustRevalidate", -> public, must-revalidate, max-age=0
"2: PrivateNormal", -> private, max-age=3600
"3: PrivateMustRevalidate", -> private, must-revalidate, max-age=0
"4: NoStore" -> no-store
To modify the cache-control policy on a global level
You can create a global cache control policy (not tied to a content library) by using either the API or an SQL query against the QRS database. A restart of the Qlik Sense Service Dispatcher and Qlik Sense Repository service is required after.
Database Query example:
INSERT INTO public."ContentCacheControls" ("ID", "CreatedDate", "ModifiedDate", "ModifiedByUserName", "Name", "Filter", "MaxAge", "CachePolicy", "ContentLibrary_ID")
VALUES ('e07ca071-7d72-417d-93c2-d60687f747a8', '2022-08-19 14:28:48.077709', '2022-08-19 14:28:48.077709', 'RDLUND\svc-silver', 'api', 'api', 3600, 4, null);
- Please update the values of "CreatedDate", "ModifiedDate", "ModifiedByUserName" keys and keep the rest of them unchanged. The ID can be any unique quid value.
- Please modify the value of "Filter" to a customised filter by using regex as per Content cache-controls.
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
What's new in Qlik Sense February 2022
What's new in Qlik Sense May 2022
Qlik Sense Enterprise on Windows
Internal Investigation ID(s):