DocumentCache.DocumentCache Constructor
Definition
- Namespace
- GleamTech.DocumentUltimate.Caching
- Assembly
- GleamTech.DocumentUltimate.dll
Initializes a new instance of the DocumentCache class.
public DocumentCache(Location location, bool keepVariations = false, DocumentUltimateConfiguration configuration = null)
Parameters
locationLocationThe location to store cached documents.
This parameter can be set to:
-
A plain string which contains a physical/virtual path
(e.g."c:\SomeFolder","/SomeFolder","~/SomeFolder").
This is parsed as GleamTech.FileSystems.Physical.PhysicalLocation.
Note that virtual paths can only be resolved in a web application
and on Linux paths starting with "/" are physical paths and not virtual paths.
-
A GleamTech.FileSystems.Location instance created with one of the builtin location providers
(e.g. GleamTech.FileSystems.Physical.PhysicalLocation, GleamTech.FileSystems.AzureBlob.AzureBlobLocation, GleamTech.FileSystems.AmazonS3.AmazonS3Location, GleamTech.FileSystems.Archive.ArchiveLocation).
You can also override GleamTech.FileSystems.Location base class to implement your custom location provider.
-
A provider string which defines a specific location provider
(e.g."Type=Physical; Path=c:\SomeFolder").
-
A plain string which contains a physical/virtual path
keepVariationsboolWhether to keep variations of document conversion results. The default is false.
For instance when you change watermark options, both Pdf and Xpz outputs are regenerated. By default the Pdf and Xpz outputs are replaced in cache when watermarks are changed. If you set this property to true, the Pdf and Xpz outputs will not be replaced but all variations will be kept in cache instead. This can be useful especially when you want different outputs for different users. So this way, for instance you can have different watermarked variations for each different user.
configurationDocumentUltimateConfigurationThe configuration to use instead of the global configuration.