Free Support Forum -

Cache handling in document conversion API for .NET


When used conversionConfig.setUseCache(true); after setting the cache directory path, How do we clear the cache files corresponding to this particular conversion after conversion is complete?


Let me guide you about setUseCache property.
This property is used to define, either the cache should be used or not. API doesn’t provide any facility to clear or remove cached files. However, you can write your own code to delete files from such a directory.
In other words if you set this property to false. API will not process cached files for a particular document (a document that is already cached).

If i set setUseCache(false); conversion still works right ? What do you mean by “API will not process cached files for a particular document” ? it wouldnt even cache if i set to false right ?

Any performance impact if set useCache as false ?


Yes, conversion will work either way.
Let me elaborate the difference. If you convert a document with setUseCache(true) that document will be cached (stored in cache folder). Next time when you process same document, it will not take that much time.

This is how cache works. Its helpful if you convert same document again (if document conversion at first attempt takes 1 minute it will take far less time in next attempt).

Yes. Data will not be cached if you set it false.

Thank you. That helps.

1 Like


You’re welcome.