I am writing a Java EE application that computes a lot of things while reading from files. This process is time consuming and I want it to be automatically cached every time I deploy the application.
So, I was thinking about creating a static class and storing the cache results in a static hash map.
But any ideas on how to automate the deployment and initialize this cache? Should I manually visit this application and initialize the cache or is there a better way out?
Sunny source share