Java cache

Added example of a simple cache in Java.