cadence-java-client
cadence-java-client copied to clipboard
Allow configure max cache size in bytes and evict workflows when consumption exceeding configured value
The cacheSize is by number of workflow threads and there is no config as total size of memory consumed. This makes it very hard to manage the memory. The only way today is to monitor on avg historySize.
Also, there is no proactive pruning mechanism to evict workflows today. Ideally we should let users configure a total cache size, and evict the workflows when the memory consumption is exceeding the configured size.
Good suggestion @longquanzheng , will look into this when I have some time.