How To Install caffeine on Fedora 36

In this tutorial we learn how to install caffeine in Fedora 36. caffeine is High performance, near optimal caching library based on Java 8

Introduction

In this tutorial we learn how to install caffeine on Fedora 36.

What is caffeine

A Cache is similar to ConcurrentMap, but not quite the same. The most fundamental difference is that a ConcurrentMap persists all elements that are added to it until they are explicitly removed. A Cache on the other hand is generally configured to evict entries automatically, in order to constrain its memory footprint. In some cases a LoadingCache or AsyncLoadingCache can be useful even if it doesn’t evict entries, due to its automatic cache loading. Caffeine provide flexible construction to create a cache with a combination of the following features automatic loading of entries into the cache, optionally asynchronously size-based eviction when a maximum is exceeded based on frequency and recency time-based expiration of entries, measured since last access or last write asynchronously refresh when the first stale request for an entry occurs keys automatically wrapped in weak references values automatically wrapped in weak or soft references notification of evicted (or otherwise removed) entries writes propagated to an external resource accumulation of cache access statistics

We can use yum or dnf to install caffeine on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install caffeine.

Install caffeine on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install caffeine using dnf by running the following command:

sudo dnf -y install caffeine

Install caffeine on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install caffeine using yum by running the following command:

sudo yum -y install caffeine

How To Uninstall caffeine on Fedora 36

To uninstall only the caffeine package we can use the following command:

sudo dnf remove caffeine

caffeine Package Contents on Fedora 36

/usr/share/doc/caffeine
/usr/share/doc/caffeine/README.md
/usr/share/java/caffeine
/usr/share/java/caffeine/caffeine.jar
/usr/share/licenses/caffeine
/usr/share/licenses/caffeine/LICENSE
/usr/share/maven-metadata/caffeine-caffeine.xml
/usr/share/maven-poms/caffeine
/usr/share/maven-poms/caffeine/caffeine.pom

References

Summary

In this tutorial we learn how to install caffeine on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).