Scan Lots of Documents at a Time - Disk Caching

Sometimes, you may need to scan hundreds or even thousands of documents at a time. In this case, the disk caching feature may come in handy. The related properties are IfAllowLocalCache and BufferMemoryLimit.

Dynamic Web TWAIN can run both in 32bit and 64bit, before version 15.0, it’s 32bit by default and that means it can utilize no more than 2 GB of physical memory. In version 15.0 onwards, 64bit has been made the default option on 64bit OS and that means there is no limitation of how much memory it can use.

The data the SDK deals with are images which take up lots of space. For example, one A4 paper scanned in 300 DPI takes around 24MB in memory (DIB). If you are running the SDK in 32bit, 2GB of memory can store no more than 85 of these images. If you run the 64bit SDK, you might want to limit how much memory the SDK actually uses so that it doesn't affect other programs on the machine. In light of this, Dynamsoft added the disk-caching feature to the SDK which, when enabled, caches most images temporarily on the disk while keeping a few active ones in the memory to maintain high performance.

The disk caching feature is enabled by default and can be disabled by setting IfAllowLocalCache to false.

We can also set how much memory we want the SDK to use before images start to be cached. By default, 800MB is used. You can change it using the property BufferMemoryLimit.


  • All cached data is encrypted and can only be accessed by Dynamic Web TWAIN

    • For ActiveX Edition: the cached data is stored in C:\Users\{User Name}\AppData\LocalLow\Dynamsoft\cache

    • For HTML5 Edition: it is stored in C:\Windows\SysWOW64 {or system32}\Dynamsoft\DynamsoftService\cache

  • When the SDK is unloaded (like when the browser tab refreshes or closes), the cached data is destroyed and removed from the disk automatically.

  • Although you can scan and load as many images as you like, you may want to handle them in a smaller volume when doing further processing. For example, you should try not to upload or save too many images as one file as that would be too time consuming and prone to errors.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""