1
DocumentUltimate Cache performance and need to support very large volumes of precached documents
Question asked by Greg Anderson - 4/27/2023 at 11:56 AM
Answered
Cem,
We are struggling with the DocumentUltimate cache location management for our clients.  We have the need to store millions of precached versions of documents our clients upload.   For that reason, we prefer to keep the DU cache within a more logical file/folder structure than what DocumentUltimate can support since it only supports one cache location per IIS server.

Is there a way that we can point the viewer to a location like:

"\\fileserver\00001\001638\015075\DocumentCache\00\00\98\00009864\~380d2t"

As a work around we've been copying the cache files from this location when the user tries to view the document to a single "immediate" cache location that we point DocuementUltimate to, but that is not performant and causes other problems.


1 Reply

Reply to Thread
0
Cem Alacayir Replied
Employee Post Marked As Answer
Which version are you using? Since Version 4.5.5 - January 22, 2019, we have an improved cache as discussed here:

Do you experience performance problems due to NTFS overhead ?

DocumentCache uses subfolder for cache items and as long as you don't enumerate files in a huge folder as in "Opening in Windows Explorer", there shouldn't be problems (DocumentCache does not enumerate on accessing a file - only when trimming).

If you still need to use separate cache folders,
actually you can use different DocumentUltimateWebConfiguration instance for each user when creating DocumentViewer:

var webConfiguration = new DocumentUltimateWebConfiguration(DocumentUltimateConfiguration.Current)
{
  CacheLocation = userCachePath
};

var documentViewer = new DocumentViewer(webConfiguration);

Every DocumentUltimateWebConfiguration instance will have a different DocumentCache instance and DocumentViewer will make use of the passed one. 

DocumentUltimateWebConfiguration.Current.CacheLocation is the global one which is used when you don't specify a custom config.

Reply to Thread