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

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

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

import io.hyperfoil.api.session.Session;

public interface HttpCache extends Session.Resource {
   Session.ResourceKey KEY = new Session.ResourceKey<>() {};

   void beforeRequestHeaders(HttpRequest request);

   void requestHeader(HttpRequest request, CharSequence header, CharSequence value);

   boolean isCached(HttpRequest request, HttpRequestWriter writer);

   void responseHeader(HttpRequest request, CharSequence header, CharSequence value);

   void tryStore(HttpRequest request);

   void invalidate(CharSequence authority, CharSequence path);

   // mostly for testing
   int size();

   void clear();

   interface Record {}

   static HttpCache get(Session session) {
      return session.getResource(KEY);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy