Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Convert CachedEntry to a Java record
Signed-off-by: Marvin Froeder <[email protected]>
  • Loading branch information
velo committed May 7, 2026
commit 0bad174a3f4837328304e3f7253141d0a387c956
6 changes: 6 additions & 0 deletions http-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
<name>Feign HTTP Cache</name>
<description>Feign HTTP Cache (ETag / Last-Modified)</description>

<properties>
<main.java.version>17</main.java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
31 changes: 1 addition & 30 deletions http-cache/src/main/java/feign/cache/CachedEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,4 @@

/** Immutable cache record produced from a successful response with revalidation headers. */
@Experimental
public final class CachedEntry {

private final Object value;
private final String etag;
private final String lastModified;
private final Instant storedAt;

public CachedEntry(Object value, String etag, String lastModified, Instant storedAt) {
this.value = value;
this.etag = etag;
this.lastModified = lastModified;
this.storedAt = storedAt;
}

public Object value() {
return value;
}

public String etag() {
return etag;
}

public String lastModified() {
return lastModified;
}

public Instant storedAt() {
return storedAt;
}
}
public record CachedEntry(Object value, String etag, String lastModified, Instant storedAt) {}