Free Support Forum -

Viewer Cache Folder Timestamp


Can you tell me how the time and date is derived for the caching folders for the viewer? We are going to create a service that will pre-cache the images so loading is faster and need the viewer to think the cache folder syntax matches the timestamp on the file being converted.


Thank you for your question.
1. Cache invalidation works in the next way: Viewer takes date of the last document editing and compare it with the date of the cache files - if the cache older it will be regenerated.
2. In the Viewer we have DocumentCache class which can be used for cache generating and you not need to create your own function.
3. If you need the date syntax to stamp it to the folder of file name here it is:
string modificationTimeString =
modificationDateTime.ToString(“s”, CultureInfo.InvariantCulture).Replace(’:’, ‘_’);

and back to dateTime

Groupdocs.Web.UI.Helper::GetDateTimeFromClientHeader(string stringClientModifiedSince)

Best regards.