Installation
Xanthic BOM
The cache-bom
will ensure that all xanthic-components in your project use the same version. See our snippets below on how to include xanthic in your project.
Usage: For Library Developers
You will want to include the xanthic-core
to code against this straightforward API and let users can choose whichever backing implementation they prefer!
Step 1: add the bom to your project:
- Gradle
- Gradle - Kotlin DSL
- Maven
build.gradle
dependencies {
api platform('io.github.xanthic.cache:cache-bom:0.6.2')
}
build.gradle.kts
dependencies {
api(platform("io.github.xanthic.cache:cache-bom:0.6.2"))
}
pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.xanthic.cache</groupId>
<artifactId>cache-bom</artifactId>
<version>0.6.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Step 2: add the cache-core
dependency:
- Gradle
- Gradle - Kotlin DSL
- Maven
build.gradle
dependencies {
api 'io.github.xanthic.cache:cache-core'
}
build.gradle.kts
dependencies {
api("io.github.xanthic.cache:cache-core")
}
pom.xml
<dependency>
<groupId>io.github.xanthic.cache</groupId>
<artifactId>cache-core</artifactId>
</dependency>
Usage: For Application Developers
As user of a library that is using xanthic, you will only need to specify the bom
and pick your one or more implementations of your choice.
Step 1: add the bom to your project:
- Gradle
- Gradle - Kotlin DSL
- Maven
build.gradle
dependencies {
implementation platform('io.github.xanthic.cache:cache-bom:0.6.2')
}
build.gradle.kts
dependencies {
implementation(platform("io.github.xanthic.cache:cache-bom:0.6.2"))
}
pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.xanthic.cache</groupId>
<artifactId>cache-bom</artifactId>
<version>0.6.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Step 2: add a cache-implementation of your choice:
See all supported implementations here
- Gradle
- Gradle - Kotlin DSL
- Maven
build.gradle
dependencies {
implementation 'io.github.xanthic.cache:cache-provider-caffeine3'
}
build.gradle.kts
dependencies {
implementation("io.github.xanthic.cache:cache-provider-caffeine3")
}
pom.xml
<dependency>
<groupId>io.github.xanthic.cache</groupId>
<artifactId>cache-provider-caffeine3</artifactId>
</dependency>