Free Support Forum - groupdocs.com

maxCacheSize set - but cache folder size exceeds


#1
Use cache mechanism on back-end seems to be in more efficient to present document preview , but the cache size should be controlled.

Try to validate cache maintain logic but result is not as expected.

application.properties

groupdocs.viewer.useHtmlBasedEngine=true
groupdocs.viewer.useCache=true
groupdocs.viewer.maxCacheSize=20

After some document preview request , the folder size exceeds 49 MB

ps. Hasn't implement CustomeHtmlCacheHandler yet ,

What's the condition to keep maxCacheSize parameter being activated ?


environment
- MS Windows 2012 (standard build 9200)
- Java version: 1.7.0_45 (JDK)
- Container: Tomcat 6.0.43
- library version : groupdocs.2.9.0

#2
Hello Raymond,

Actually the cache control works, but the check is triggered when the file list is loaded. It happens when the GroupDocs.Viewer UI is loaded for the first time and when directories are browsed in the file browser tree. In particular, the cache size control check is made on every loadFileBrowserTreeData request. We made in this way to eliminate collisions when the application can remove resources from the cache that are currently used or should be used in a moment.

Our product team was informed about this situation. The ticket for the cache control improvement was registered in our system as VIEWERJAVA-907 (“Improve the cache size limit check”). When it will be released you’ll get a notification.


#3

Hi Ihor,



File consumed method url_to_file is used and showFolderBrower is false

groupdocs.viewer.useCache=true
groupdocs.viewer.useBrowserCache=true
groupdocs.viewer.useHtmlBasedEngine=true

groupdocs.viewer.filePath=null
groupdocs.viewer.showFolderBrowser=false

Does that mean the cache control mechanism would not be triggered?

#4
Hello Raymond,

Unfortunately, yes. With this configuration, the cache control mechanism won’t be triggered. You can separately call the loadFileBrowserTreeDataHandler or loadFileBrowserTreeDataHandler methods to run the cache check functionality.

Our product team is informed about this situation and will work on it. Sorry for the inconvenience.