How to:

  1. You need CDI (and Infinispan if you re-use the code without altering it)
  2. Grab the code from the Gist and put it into your project
  3. Annotate the methods you want to use the caching
  4. Enable the caching interceptor in your beans.xml
    <beans xmlns=""
  5. Build yourself a clear operation to manually evict the cache, you'll need it.