Cache Operations Access
The caching and pre-caching endpoints accessible by this page accept a simple passcode in order to deny unwanted users access to important information. For a true deployed application, consider more advanced security techniques.
Cache
The Document Viewer Service uses a cache system for quicker access to document information. The information below will include pre-cached documents.
- Regions
- Regions usually represent a document or a conversion / save result.
- Items
- Items represent some cache entity, such as a document page, thumbnail, OCR result, etc.
- Expired Items
- Expired Items are those in the cache that are past the expiration set in the .config file.
Pre-Caching
Documents can be pre-cached (using multiple values of maximumImagePixelSize) so that certain data, such as OCR text or SVG images, will be readily available in the client.
The time taken to pre-cache a document scales with the complexity of a document, and for very large files will take minutes.
The Pre-Cache list (a cache in itself) can be "cleaned" to remove references to documents that have been deleted from the regular cache.
Development
For a guide to better understanding this project for development, see the development page.
Connecting a Client
This project contains the Documents Service Web Api project only. To use this service, create a client-side application with the LEADTOOLS Document JavaScript Library and connect via the below setup properties (which are specified in the DocumentViewerApp project's serviceConfig.json):
- lt.Document.DocumentFactory.serviceHost
- The host of the service (including protocol).
- Keep it as the default, null, if the host is the same as the client.
- lt.Document.DocumentFactory.servicePath
- The virtual path from the service's host to the root of the service project.
- Keep it as the default, null, if the path is the same as the virtual path from the client app's host to the client app.
- lt.Document.DocumentFactory.serviceApiPath
- The path to the routing namespace of the Documents Service, which by default is null.
- Always specify the value as "api" unless the routing namespace is changed in WebApiConfig.cs.
These properties are processed and (essentially) concatenated to produce the lt.Document.DocumentFactory.serviceUrl used by the client.