Apache Ignite as MyBatis L2 Cache | Ignite Documentation

Ignite Summit 2023 — Watch on demand — Register now!


Apache Ignite as MyBatis L2 Cache

Apache Ignite can be used as a MyBatis L2 cache that distributes and caches data across a cluster of machines.

If you are an Apache Maven user, simply add the following dependency to the pom.xml:


Alternatively, you can also download the zip bundle, decompress it and add the jars in the classpath.

Then, just specify it in the mapper XML as follows:

<mapper namespace="org.acme.FooMapper">
  <cache type="org.mybatis.caches.ignite.IgniteCacheAdapter" />

and configure your Ignite cache in config/default-config.xml. (Simple reference configurations are available on GitHub)