Play already comes with an easy to scale cache solution included, namely memcached. However, you might not want to use memcached at all. It might not fit your needs, your admin may not want to install another application on a system, or anything else. Instead of not using a cache at all, this recipe shows you how to write your own implementation of a cache. This example will use Hazelcast, a pure Java distributed system as implementation.
You can find the source code of this example in the
It requires a little bit of work to get to the point to start programming. We need to get Hazelcast instance up and running and setup an application for development. ...