Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Aug 24, 2023 6:54:34 AM
Sep 20, 2012 8:53:12 AM
The cache is handled automatically by QlikView Server or Qlik Sense Engine and should not be cleared manually.
However, in some situations, there might be a reason to clear the cache on a regular basis. An example would be memory starvation due to an insufficiently sized system.
Note using this option does not unload any Documents/Apps from memory. It only clear out stored information such as sessions and calculations.
Clearing the cache has an immediate negative impact on performance. Qlik is built as an in-memory engine and relies on access to cached information in memory. We do not recommend using the clear cache functionality but instead ensure the server is correctly scaled.
[Settings 7] ClearCacheTimesPerDay=1
The value set is the number of times per day the cache will be cleared, synchronized at midnight. A value of 1 will clear the cache once per day at midnight (UTC). The number needs to be 1 or higher. Always a natural number.
Attention: Clearing the cache may lead to increased response times from the user's perspective. Use with caution!
Details on how to modify the settings.ini for Sense: How to modify Qlik Sense Engine's Settings.ini.
To verify if the cache is cleared, perform the below.
Hi @Sonja_Bauernfei
Can you please help us understand more clearly.
If we save the settings service as ClearCacheTimesPerDay=1
And restart the server at 2 pm.
Then the next automatic service restart would happen after 24 hours 2 pm or at midnight ?
Will it kill the current users live session ?
How can we confirm that Cache got cleared ?
If it occurs at midnight then setting -> ClearCacheTimesPerDay=3 will restart it at which two timings ?
(8, 16, 24) o clocks ?
Please help confirm!
Thanks
Hello @SwapneelGolapkar
It is always synchronized with midnight UTC (so, 00:00 UTC). Meaning if you set it to 1, it will clear cache once, at midnight.
Please note that this is not a restart. It will not restart any services, but it will drop cached information from, well, the cache. This also means that user traffic will not be impacted at the time of cache clearing. What users may see afterwards is that their experience in an app may be slower, as the Qlik engine will not have any cached data to make use of and has to recalculate everything.
>>> If it occurs at midnight then setting -> ClearCacheTimesPerDay=3 will restart it at which two timings? (8, 16, 24) o clocks ?
00/24, 8, 16, then 00/24 again, that is correct (UTC).
All the best,
Sonja
Thanks @Sonja_Bauernfeind
Appreciate your quick responses and detailed reply.
Can you plz also suggest how can we validate this ? is there a log which keeps a track of Cache being cleared ?
Or any System event which we can check when Clearing happens ?
Regards,
Swapneel
Hello @SwapneelGolapkar
To verify:
Set
ClearCacheTimesPerDay=2
and system logs
20230813T150030.478+0300 PhoenixThread: Zap/clear cache performed
20230814T030011.302+0300 PhoenixThread: Zap/clear cache performed
Seems that cache is cleared at 03:00 and at 15:00 local time.
What needs to be done to have cache cleared at 00:00 and at 12:00 local time?
Hello @dmitri_volkov
Later versions of QlikView and Qlik Sense rely on UTC, so you'd be setting the timing for UTC. Specifying other times is not possible.
Please note that this functionality is not recommended, as it has an impact on Qlik's performance; we recommend ensuring the servers are correctly scaled and can manage their memory requirements without the need of cache clearing or restarts.
All the best,
Sonja