DocumentCache Constructor

Initializes a new instance of the DocumentCache class.

Definition

Namespace: GleamTech.DocumentUltimate.Caching
Assembly: GleamTech.DocumentUltimate (in GleamTech.DocumentUltimate.dll) Version: 6.9.8
C#
public DocumentCache(
	Location location,
	bool encryptionEnabled = true,
	bool keepVariations = false,
	DocumentUltimateConfiguration configuration = null
)

Parameters

location  Location
The 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 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 Location instance created with one of the builtin location providers
    (e.g. PhysicalLocation, AzureBlobLocation, AmazonS3Location, ArchiveLocation).

    You can also override 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").

encryptionEnabled  Boolean  (Optional)
Whether encryption of documents should be enabled. The default is true.

Document viewer downloads a special document format (XPZ) on the client-side but for additional security (DRM), the document is also encrypted by default.

Note that changes in this property change CacheXpzKey.

keepVariations  Boolean  (Optional)
Whether 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.

configuration  DocumentUltimateConfiguration  (Optional)
The configuration to use instead of the global configuration.

See Also