Will DocumentUltimate file cache can be deleted automatically after CacheMaxDays?
Question asked by xiaoyun - 9/30/2018 at 12:23 AM
Answered
Hi there,
I am using DocumentUltimate and want to know whether DocumentUltimate can handle deleting the cached files automatically when pass the CacheMaxDays. 
 
Thanks!
Cui Yansong Replied
Do we support CacheMaxDays to CacheMaxMinutes?
Cem Alacayir Replied
Employee Post Marked As Answer
Regarding cache lifetime of a file:
 
CacheMaxDays Gets or sets the maximum number of days to store cached documents. The default value is 90 days.
For example if you set:
 
DocumentUltimateWebConfiguration.Current.CacheMaxDays = -1;
 
Then cached files would immediately expire. However this is not automatic (not a background task), the deletion only occurs when a new cache request comes (e.g. when you view a new document) and if 20 minutes interval has passed. So cache trimming is triggered every 20 minutes. For example if nobody uses your viewer for a week, the cached files will not be touched. 
 
So if your viewed documents are short-lived you can use this setting to prevent keeping them cached.
 
 
Cem Alacayir Replied
Employee Post
Please see my reply below.
Cui Yansong Replied
Thanks for reply.

Maybe I was wrong with this behavior when we set CacheMaxDays to -1, the cache file didn't delete immediately until next day.

If any confusion, please let me know.

Reply to Thread

Enter the verification text