Play uses Caffeine as the default cache and Caffeine supports a wide range of parameters. However, not all of the Caffeine parameters are configurable via Play config files. The supported parameters are listed in CaffeineParser.java. Other parameters are supposed to be “configured in code” according to the comment in the file. We would like to use refreshing in combination with expiring in our HTTP response cache to be able to always return cached responses for our most popular routes.
My question is: How should these parameters be configured in the code?
I assume we will need to override something from the relevant module, but I can’t seem to find any documentation or examples of how to do that.
Thank you for reading this far. Any help or suggestions will be much appreciated.