Skip to content

Commit

Permalink
Modify javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mizosoft committed Dec 28, 2023
1 parent e2c3435 commit acac097
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Moataz Abdelnasser
* Copyright (c) 2023 Moataz Abdelnasser
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,14 +22,12 @@

package com.github.mizosoft.methanol.internal.cache;

import static com.github.mizosoft.methanol.internal.cache.HttpDates.toHttpDateString;
import static com.github.mizosoft.methanol.internal.cache.HttpDates.toUtcDateTime;

import com.github.mizosoft.methanol.CacheControl;
import com.github.mizosoft.methanol.MutableRequest;
import com.github.mizosoft.methanol.ResponseBuilder;
import com.github.mizosoft.methanol.TrackedResponse;
import com.github.mizosoft.methanol.internal.util.Compare;

import java.net.http.HttpHeaders;
import java.net.http.HttpRequest;
import java.time.Duration;
Expand All @@ -38,6 +36,9 @@
import java.time.ZoneOffset;
import java.util.Optional;

import static com.github.mizosoft.methanol.internal.cache.HttpDates.toHttpDateString;
import static com.github.mizosoft.methanol.internal.cache.HttpDates.toUtcDateTime;

/**
* A strategy for determining whether a stored response is fresh enough for the cache to serve
* without contacting the origin, based on the caching rules imposed by the server & client.
Expand Down Expand Up @@ -192,7 +193,9 @@ CacheStrategy build(Instant now) {
}
}

/** A rule for relaxing a response's staleness. */
/**
* A rule for accepting stale responses upto a maximum staleness.
*/
enum StalenessRule {
MAX_STALE {
@Override
Expand Down

0 comments on commit acac097

Please sign in to comment.