Skip to content
A Simple Java Caching using JBoss Datagrid on top of Openshift
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Creating a Simple Spring Boot @Cacheable Cache using JBoss DataGrid on top of Openshift


A simple proof of concept of how caching works out of the box using JBoss DataGrid (JDG), and how to integrate it to Spring Boot seamlessly.

Just add a cache with a specific name on your JBoss Datagrid YAML file,

    - name: CACHE_NAMES
      value: 'jeje,jjongjong,bakerooo,default'

Point your cache provider to JBoss Datagrid HotRod route url

    public RemoteCacheManager remoteCacheManager() {
        ConfigurationBuilder builder = new ConfigurationBuilder();
        return new RemoteCacheManager(;

And call it on your java code using @Cacheable annotation.

    public Long getNow() {
        return System.currentTimeMillis();
You can’t perform that action at this time.