PDFView cache management and optimizations for Mobile Devices

Q: I have a question about PDFView and cache management. I understand
when caching is turned on it will write to cache when it is finished
rendering. Is there a way to force a write to cache while it is still
drawing to the buffer at certain intervals? For example, if there was
a call to onscroll for 2 pixels during a large buffer write, the
current action will be to move the 2 pixels and start the draw process
again from the start even though it was already halfway done.

  If there is no explicit way of causing cache writes between the
start and finish I have seen a workaround that needs your input:
Since the cache is written after the draw process is finished I was
wondering if I can force a cache write by calling view-

CancelRendering(); Then call view->Update() right after to start

updating the buffer again after a cache write. Since view-

CancelRendering() calls the FinishRender Procedure I would assume

this mimics the draw process finishing.

Do I have to handle the "canceled" argument in a different way to the
FinishRendering proc in order for it to think that the action
completed normally vice being cancelled in order to write to cache?
Or does this matter. Does it have to go through the "last refresh" in
order for a cache write?
---
A: There are two primary levels of caching in PDFView class: 'rendered
buffer' and 'resource' caching. The 'rendered buffer' caching is
always turned on. Essentially this cache is used for fast scrolling.
For example, when a user scrolls the view 2 pixels down, PDFView will
copy the cached image 2 pixels up and will re-render only the newly
exposed area (2 x image_width). The 'resource' caching is used to
cache embedded images and fonts to speed-up repeated rendering on the
same page (or short sequence of pages). This type of caching can be
switched 'on' and 'off' using pdfview.SetCaching(enable) method. Since
the embedded images could be fairly large 'resource' caching is by
default disabled on mobile platforms. On desktop platforms 'resource'
caching is enabled by default.

Does it have to go through the "last refresh" as commented below in
order for a cache write?

Yes, 'rendered buffer' caching requires that rendering action is
completely finished before reusing the image part in subsequent
rendering operations.