Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Qlik Web Connectors - Clearing Cached Data

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Bjorn_Wedbratt
Former Employee
Former Employee

Qlik Web Connectors - Clearing Cached Data

Last Update:

May 28, 2021 1:36:48 PM

Updated By:

Andre_Sostizzo

Created date:

Jun 28, 2016 7:31:06 AM


Some connectors cache data locally, this has the benefit of:

  • Vastly improved load time after initial download of data.
  • Reduced number of calls to API (which often have throttle and usage limits)

 

Clearing the cache in the UI

?If you wish to delete the data cached for a connector manually

  • Open Qlik Web Connectors in your browser (http://localhost:5555/web)
  • Select the connector and go to the 'Settings' tab for the connector
  • Click the 'Clear Cached Data' button as highlighted below.


000020303a.png

 


 

Clearing the cache using load script

If you wish to clear the cache in your load script you may do so with the following script:
 

1
2
3
4
5
6
7
8
ClearCache:
LOAD [Qlik Web Connectors_ClearCache_Result], 
     [Qlik Web Connectors_ClearCache_SearchPattern], 
     [Qlik Web Connectors_ClearCache_NoItemsDeleted]
FROM
[http://localhost:5555/data?connectorID=CONNECTOR_NAME&clearcache=true]
(txt, utf8, embedded labels, delimiter is '\t', msq);

You just need to replace CONNECTOR_NAME with the the right value, this will be the value present in the same place in the url for the other load statements you use for this connector.

So for example for the Twitter Connector you could place this as the first statement in your load script, perhaps running it conditionally based on the number of days since your last reload.
 

1
2
3
4
5
6
7
8
ClearCache:
LOAD [Qlik Web Connectors_ClearCache_Result], 
     [Qlik Web Connectors_ClearCache_SearchPattern], 
     [Qlik Web Connectors_ClearCache_NoItemsDeleted]
FROM
[http://localhost:5555/data?connectorID=TwitterConnector&clearcache=true]
(txt, utf8, embedded labels, delimiter is '\t', msq);

 

Advanced Arguments

Pattern Matching

Some connectors support an additional paramter: &clearcache_searchPattern=

Here you can pass in a string with * wildcards to further specify which cached items are to be deleted. Currently only the Facebook for Pages Connector and Facebook Insights Connector supports this - typically you would use 'clearcache_searchPattern=[pagename_or_id]'. So for example to clear all the cached items for the QlikView Facebook page simply use.
 

1
2
3
4
5
6
7
8
ClearCache:
LOAD [Qlik Web Connectors_ClearCache_Result], 
     [Qlik Web Connectors_ClearCache_SearchPattern], 
     [Qlik Web Connectors_ClearCache_NoItemsDeleted]
FROM
[http://localhost:5555/data?connectorID=FacebookFanPagesConnector&clearcache=true&clearcache_searchPattern=qlikview_*]
(txt, utf8, embedded labels, delimiter is '\t', msq);

 

Only Deleting Items Older Than X Hours

You can use the parameter:

&clearcache_ageInHours=X

Where X is an integer greater than or equal to zero. If this is specified, then only items older than this will be deleted.
 

Changing the Cache Directory

By default the Qlik Web Connectors cache will be contained in a sub-directory under QlikWebConnectors.exe. For example if Qlik Web Connectors is running in the folder: 
F:\Qlik Web Connectors\

the cache for each connector will be located at:
- F:\Qlik Web Connectors\App_Data\[User]\[CONNECTOR_NAME]_Cache

where [User] is the GUID for the user logged in when setting up the connector (Default GUID for Admin is DEFAULT0-000-000-000-00000000000)

As an example, results from the sentiment analyzer will be cached at:
- F:\Qlik Web Connectors\App_Data\DEFAULT0-000-000-000-00000000000\SentimentAnalyser_Cache

You can change the directory where the cache is installed by editing deploy.config and change the FileBasedCacheProvider setting:

<Cache provider="FileBasedCacheProvider" config="{app_root}/App_Data/{user_id}/{connector_id}_Cache/"></Cache>?
 

Compressing the Cache Folder

A large number of files can accumulate in the cache directory and for this reason we would recommend configuring Windows to compress it. To do this right click on your App_Data folder and select properties:

000020303b.png

 

The click the 'Advanced' button:

000020303c.png

 

Then check the 'Compress' option:

000020303d.png

 


You should then confirm the following:

000020303e.png

 

You should then see the folder highlighted in blue illustrating that it is compressed.

 

Labels (1)
Contributors
Version history
Last update:
‎2021-05-28 01:36 PM
Updated by: