Skip to content
This repository contains Hazelcast Cache Integration for Micronaut.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

Table of Contents

Hazelcast Cache Integration for Micronaut

This repository contains Hazelcast Cache Integration for Micronaut. Similar to Spring and Grails, Micronaut provides a set of caching annotations. This integration contains an implementation of SyncCache interface to provide caching features with Hazelcast.

Requirements and Installation

  • Maven

To install, clone the repository and run the following script in the root directory:

mvn clean install -DskipTests=true

Caching with Hazelcast in Micronaut

If you wish to use Hazelcast to cache results then you need to have the hazelcast-micronaut-cache dependency on your classpath.

Configuration with Maven:

<dependency>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-micronaut-cache</artifactId>
    <version>[VERSION]</version>
</dependency>

Then within your Micronaut application configuration, configure the Hazelcast cache as follows:

hazelcast:
    client: false
    xmlConfigPath: /path/to/hazelcast.xml
    caches:
        [YOUR_CACHE_NAME]:
            enabled: true

Configuration properties

  • hazelcast.client: (default: false) Set true for using Hazelcast Java client
  • hazelcast.xmlConfigPath: The path of XML configuration file of HazelcastInstance. If you leave it empty, the XML configuration file in the classpath is used.
  • hazelcast.caches.YOUR_CACHE_NAME.enabled: Set true to use the cache you configured. Replace the YOUR_CACHE_NAME with the cache name you would like to use.
You can’t perform that action at this time.