Thanks, that was an interesting read.
There are two ways how the cache may be used. By default, GroupDocs.Viewer creates a cache in the “/temp” subfolder. Another way is to use the “IStorageProvider” approach. The class “Groupdocs.Web.UI.Viewer” contains a static method “SetStorageProvider”, which has the next overload:
public static void SetStorageProvider(IStorageProvider storageProvider, IStorageProvider tempStorageProvider);
If you specify this method, GroupDocs.Viewer will not use any files in the local folder at all: all operations will be done via storage provider.
First parameter, “storageProvider”, is responsible for obtaining and browsing documents, which should or can be displayed.
Second parameter, “tempStorageProvider”, is responsible for internal files, including cache.
Of course, this approach requires additional coding - you should implement the “IStorageProvider” interface by yourself. But this approach is very flexible and allows you to specify any storage of any kind.
So, in the Global.asax or where you want to initialize the GroupDocs.Viewer, you should have something like this:
IStorageProvider document_storage = new YourCustomStorageProviderForDocuments();
IStorageProvider cache_storage = new YourCustomStorageProviderForCache();
Here is a special version of the “GroupDocs.Viewer Sample Demo”. Inside the solution there is a project “GroupDocsViewerMVCDemo”. This project is modified - it uses the “IStorageProvider” implementation of the custom storage provider.
So, concluding, cache should exist in any case. If your implementation of the “IStorageProvider” will be incorrect, undefined and non-obvious errors may occur. This way requires maximum attention.
Thanks for the details response.