https://github.com/playframework/cachecontrol
Minimal HTTP cache management library in Scala
https://github.com/playframework/cachecontrol
cache-control cachecontrol caching http-cache playframework scala
Last synced: 5 months ago
JSON representation
Minimal HTTP cache management library in Scala
- Host: GitHub
- URL: https://github.com/playframework/cachecontrol
- Owner: playframework
- License: apache-2.0
- Created: 2015-05-05T23:57:32.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2024-03-24T17:22:18.000Z (over 1 year ago)
- Last Synced: 2024-04-14T04:23:04.657Z (about 1 year ago)
- Topics: cache-control, cachecontrol, caching, http-cache, playframework, scala
- Language: Scala
- Homepage:
- Size: 584 KB
- Stars: 13
- Watchers: 7
- Forks: 17
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cachecontrol - Minimal HTTP cache management library in Scala
[](https://twitter.com/playframework)
[](https://discord.gg/g5s2vtZ4Fa)
[](https://github.com/playframework/playframework/discussions)
[](https://stackoverflow.com/tags/playframework)
[](https://www.youtube.com/channel/UCRp6QDm5SDjbIuisUpxV9cg)
[](https://www.twitch.tv/playframework)
[](https://opencollective.com/playframework)[](https://github.com/playframework/cachecontrol/actions/workflows/build-test.yml)
[](https://mvnrepository.com/artifact/org.playframework/cachecontrol_2.13)
[](https://github.com/playframework/cachecontrol)
[](https://scala-steward.org)
[](https://mergify.com)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](https://tools.ietf.org/html/rfc7234). The core idea is abstracting the decision about what to cache and when, following the example of [Caching is Hard, Draw Me A Picture](http://www.bizcoder.com/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