Hi,
I am a junior webMethods developer.When I read in <webMethods Developer User’s Guide>, it says "Important! Use Prefetch carefully. Overuse can quickly exhaust the memory available for
cache." How to comprehand this sentence and how to use prefetch properly?
I also want to know how webMethods distributes memory space for cache.Could anyone kindly explain this for me in detail?
Caching uses the name of the service and the values of the inputs as a key. With this key, it stores the results of the service in memory. On subsequent calls to the service, if the inputs match a cache key then the results of the previous invocation will be returned instead running the service.
Service results are cached for every unique set of inputs. For example, if you call a service passing each letter of the alphabet to it, A-Z, then there will be 26 results cached in memory.
Prefetch is a way to keep results cached when the server would normally flush them. This can increase the amount of memory consumed and is why they have the additional warning.
Use caching conservatively. The typical use I’ve seen is for reading configuration files. It would be nice if it could be configured to “keep the last 5 most recently used” or something like that but it doesn’t. Only time is used to control flushing of cached results.