Skip to content

Minimal HTTP cache management library in Scala

License

Notifications You must be signed in to change notification settings

playframework/cachecontrol

Folders and files

NameName
Last commit message
Last commit date
Apr 8, 2025
Apr 10, 2025
Oct 5, 2023
Jan 3, 2022
Aug 3, 2021
Mar 17, 2025
Jul 22, 2021
Oct 5, 2023
Nov 1, 2023
Jan 25, 2023

Cachecontrol - Minimal HTTP cache management library in Scala

Twitter Follow Discord GitHub Discussions StackOverflow YouTube Twitch Status OpenCollective

Build Status Maven Repository size Scala Steward badge Mergify Status

This is a minimal library that provides a set of utility calculators that abstract away much of the fiddly complexities involved in adhering to the HTTP caching model, aka RFC 7234. The core idea is abstracting the decision about what to cache and when, following the example of Caching is Hard, Draw Me A Picture.

It does not implement caching itself, and there are some aspects of RFC 7234 which must be implemented directly, such as stripping headers, invalidating unsafe methods, and implementing the Vary header functionality correctly.

Usage

To add this project to sbt, use:

libraryDependencies += "org.playframework" %% "cachecontrol" % -latest version-
// Versions older than 3.0.0:
libraryDependencies += "com.typesafe.play" %% "cachecontrol" % "2.3.1"

Releasing a new version

See https://github.com/playframework/.github/blob/main/RELEASING.md