HttpCacheMode Enumeration |
Selects what the rendering engine's HTTP cache keeps from one conversion for the next.
Namespace: ExpertPdf.Anywhere.HtmlToPdfAssembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntaxpublic enum HttpCacheMode
Public Enumeration HttpCacheMode
Members| Member name | Value | Description |
|---|
| Clear | 0 |
Nothing is kept: every conversion starts with an empty HTTP cache, so no conversion can see a response
another conversion fetched.
|
| ThirdParty | 1 |
Resources from other sites (fonts, style sheets and scripts served from content delivery networks, for
example) are kept for the next conversion; the converted page's own site - the page, its base URL, a login
page and any page it redirects to - is never read from or written to the cache.
|
| All | 2 |
Everything is kept for the next conversion. This is the fastest mode for pages converted repeatedly, but a
response fetched by one conversion can be served to the next one: do not use it when conversions run on
behalf of different users whose responses must stay separate, or when a page's content changes while its
URL stays the same.
|
Remarks
The setting applies when the engine runs inside the application
(
InProcess). A conversion that runs in its own engine
process always starts with an empty cache, whatever this setting says.
Cookies and site storage (localStorage, sessionStorage, IndexedDB) are cleared after every conversion in every
mode. Requests that carry the conversion's own credentials, cookies or custom HTTP headers never read from or
write to the cache.
ExamplePdfConverter pdfConverter = new PdfConverter();
pdfConverter.HttpCache = HttpCacheMode.ThirdParty;
Dim pdfConverter As New PdfConverter()
pdfConverter.HttpCache = HttpCacheMode.ThirdParty
See Also