Digipost Caching

Caching functionality.

License

License

GroupId

GroupId

no.digipost
ArtifactId

ArtifactId

digipost-cache
Last Version

Last Version

2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Digipost Caching
Caching functionality.
Project URL

Project URL

https://github.com/digipost/digipost-cache
Project Organization

Project Organization

Digipost
Source Code Management

Source Code Management

https://github.com/digipost/digipost-cache/

Download digipost-cache

How to add to project

<!-- https://jarcasting.com/artifacts/no.digipost/digipost-cache/ -->
<dependency>
    <groupId>no.digipost</groupId>
    <artifactId>digipost-cache</artifactId>
    <version>2.0</version>
</dependency>
// https://jarcasting.com/artifacts/no.digipost/digipost-cache/
implementation 'no.digipost:digipost-cache:2.0'
// https://jarcasting.com/artifacts/no.digipost/digipost-cache/
implementation ("no.digipost:digipost-cache:2.0")
'no.digipost:digipost-cache:jar:2.0'
<dependency org="no.digipost" name="digipost-cache" rev="2.0">
  <artifact name="digipost-cache" type="jar" />
</dependency>
@Grapes(
@Grab(group='no.digipost', module='digipost-cache', version='2.0')
)
libraryDependencies += "no.digipost" % "digipost-cache" % "2.0"
[no.digipost/digipost-cache "2.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.github.ben-manes.caffeine : caffeine jar 2.6.2
org.slf4j : slf4j-api jar 1.7.25

test (5)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : java-hamcrest jar 2.0.0.0
no.digipost : digg jar 0.14
org.mockito : mockito-core jar 2.16.0
org.slf4j : slf4j-simple jar 1.7.25

Project Modules

There are no modules declared in this project.

Digipost Cache

Maven Central License

Library containing caching functionality used by Digipost projects.

Feature overview

In-memory cache

The entry point for creating in-memory caches can be found in the no.digipost.cache2.inmemory package, which wraps the Caffeine cache implementation. In addition to standard key-value cache, this library also offers a specialized API for caching a shared single object (SingleCached<V>).

Fallback

Digipost Cache also supports a fallback-concept, currently implemented as storing cache values on the file system. In the event of a cache value Loader failing (e.g. if it resolves the value over the network or other error-prone I/O), the last value it successfully loaded will instead be read from a disk-file. Other ways to store and read values for fallback can be implemented by implementing FallbackKeeper for storing a value for fallback, and the already mentioned Loader for loading an already stored fallback value.

no.digipost

Digipost

Digipost er Norges digitale postsystem utviklet av Posten Norge AS.

Versions

Version
2.0