All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hyperfoil.http.api.CacheControl Maven / Gradle / Ivy

There is a newer version: 0.27.1
Show newest version
package io.hyperfoil.http.api;

import java.util.ArrayList;
import java.util.List;

public class CacheControl {
   public boolean noCache;
   public boolean noStore;
   public boolean onlyIfCached;
   public boolean ignoreExpires;
   // TODO: We're allocating iterator in this collection for removal
   // TODO: also optimize more for removal in the middle
   public List matchingCached = new ArrayList<>(4);

   public boolean invalidate;
   public boolean responseNoCache;
   public boolean responseMustRevalidate;
   public long responseExpires = Long.MIN_VALUE;
   public int responseAge;
   public int responseMaxAge;
   public CharSequence responseEtag;
   public long responseDate = Long.MIN_VALUE;
   public long responseLastModified = Long.MIN_VALUE;

   public boolean wasCached;

   public void reset() {
      noCache = false;
      noStore = false;
      onlyIfCached = false;
      ignoreExpires = false;
      matchingCached.clear();

      invalidate = false;
      responseNoCache = false;
      responseMustRevalidate = false;
      responseExpires = Long.MIN_VALUE;
      responseAge = 0;
      responseMaxAge = 0;
      responseEtag = null;
      responseDate = Long.MIN_VALUE;
      responseLastModified = Long.MIN_VALUE;

      wasCached = false;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy