Class ResponseCache

java.lang.Object
net.targetr.wtm3.cache.ResponseCache

public class ResponseCache extends Object
Quickly builds responses by caching ETags.
Author:
Dr Michael Gardiner
  • Method Details

    • get

      public static ResponseCache get()
    • get

      public HttpByteArrayResponse get(String path, String contentType) throws IOException
      Get a resource quickly by using cache if possible.
      Parameters:
      path - the path to the resource in the class path.
      contentType - the type to set in the response header.
      Returns:
      response containing data from the resource.
      Throws:
      IOException - An exception occurred while reading the resource from class path.