 |
HttpCacheMode Enumeration |
Selects what the Chromium engine's HTTP cache keeps from one conversion for the next.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.HtmlToPdf.Universal (in SelectPdf.HtmlToPdf.Universal.dll) Version: 26.4
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.
ExampleHtmlToPdf converter = new HtmlToPdf();
converter.Options.HttpCache = HttpCacheMode.ThirdParty;
Dim converter As New HtmlToPdf()
converter.Options.HttpCache = HttpCacheMode.ThirdParty
See Also