0ebac67a9f
In the `BaseViewer` this cache is mostly relevant in the `disableAutoFetch = true` mode, since the pages are being initialized *lazily* in that case. In the `PDFThumbnailViewer` this cache is mostly used for thumbnails that are actually being rendered, as opposed to those created directly from the "regular" pages. Please note that I'm not suggesting that we remove these caches because they're only used in some situations, but rather because they're for all intents and purposes actually *redundant*. In the API itself, we're already caching both the page-promises and the actual pages themselves on the `WorkerTransport`-instance. Hence these viewer-caches aren't really necessary in practice, and adds what to me mostly seems like an unnecessary level of indirection.[1] Given that the viewer now relies on caching in the API itself, this patch also adds a new unit-test to ensure that page-caching works (and keep working) as expected. --- [1] In the `WorkerTransport.getPage`-method the parameter is being validated on every call, but that's hardly enough code to warrant keeping the "duplicate" caches in the viewer in my opinion. |
||
---|---|---|
.. | ||
chromium | ||
font | ||
integration | ||
pdfs | ||
resources | ||
stats | ||
ttx | ||
types | ||
unit | ||
.eslintrc | ||
.gitignore | ||
add_test.js | ||
annotation_layer_builder_overrides.css | ||
downloadutils.js | ||
driver.js | ||
integration-boot.js | ||
test_manifest.json | ||
test_slave.html | ||
test.js | ||
testutils.js | ||
text_layer_test.css | ||
webserver.js | ||
xfa_layer_builder_overrides.css |