Class HttpCacheSettings

java.lang.Object
com.realobjects.pdfreactor.useragent.HttpCacheSettings

public class HttpCacheSettings extends Object

This class contains all options related to the UserAgent's HTTP cache.

  • Constructor Details

    • HttpCacheSettings

      public HttpCacheSettings()
  • Method Details

    • getEnabled

      public Boolean getEnabled()
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public HttpCacheSettings setEnabled(Boolean value)

      Enables the HTTP cache. This will cause PDFreactor to cache all resources loaded over HTTP(S) in a browser-like fashion according to their cache headers.

      Returns:
      The current HttpCacheSettings instance.
    • setDirectory

      public HttpCacheSettings setDirectory(Path value)

      Configures the file system path to the HTTP cache. If no path is defined, resources will be cached in-memory. If a path is specified, only one UserAgent may use it. If you try to create a new UserAgent with HttpCacheSettings that have the same path, the constructor will throw an exception.

      Returns:
      The current HttpCacheSettings instance.
    • setMaxEntries

      public HttpCacheSettings setMaxEntries(Integer maxEntries)

      The maximum number of entries in the cache. Defaults to 100.

      Returns:
      The current HttpCacheSettings instance.
    • setMaxObjectSize

      public HttpCacheSettings setMaxObjectSize(Long maxObjectSize)

      The maximum size that any one particular cache object can have in bytes. If the object's size exceeds this value, the object won't be cached. Defaults to 5,000,000 (5 MB).

      Returns:
      The current HttpCacheSettings instance.