Welcome Guest, you are in: Login

QVSource: The QlikView & Qlik Sense API Connector (Docs)

Cache Management

RSS
Modified on 2012/09/03 17:23 by darrenb Categorized as advanced

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, go to the 'Connector Settings' tab, and then the 'General Connector Settings' tab and then click the 'Clear Cached Data' button as highlighted below.

Image

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:


ClearCache:
LOAD
QVSource_ClearCache_Result,
QVSource_ClearCache_SearchPattern,
QVSource_ClearCache_NoItemsDeleted
FROM
[http://localhost:5555/QVSource/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 Facebook 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.


ClearCache:
LOAD
QVSource_ClearCache_Result,
QVSource_ClearCache_SearchPattern,
QVSource_ClearCache_NoItemsDeleted
FROM
[http://localhost:5555/QVSource/FacebookFanPagesConnector/?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.


ClearCache:
LOAD
QVSource_ClearCache_Result,
QVSource_ClearCache_SearchPattern,
QVSource_ClearCache_NoItemsDeleted
FROM
[http://localhost:5555/QVSource/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 QVSource cache will be contained in a directory under QVSource.exe. For example if QVSource is running in the folder: F:\QVSource\QVSource.exe

Then the cache for each connector will be located at:
F:\QVSource\Data\[CONNECTOR_NAME]\Cache

So for example results from the sentiment analyser will be cached at:
F:\QVSource\Data\SentimentAnalyser\Cache

If you have a licence which enables this, you can change the directory where the cache is installed on the 'Advanced' tab:

Image

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 data folder and select properties:

Image

The click the 'Advanced' button:

Image

Then check the 'Compress' option:

Image

You should then confirm the following:

Image

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

Image


(QVSource works with Qlik Sense as well as QlikView - See this page for notes.)
QVSource - The QlikView & Qlik Sense API Connector | © Copyright 2011 - 2014 Industrial CodeBox Ltd