Class DepCache

java.lang.Object
io.root.patcher.DepCache

public class DepCache extends Object
SHA-1-keyed JSON file cache for Root.io API responses, stored under .gradle/rootio-cache/.
  • Constructor Details

    • DepCache

      public DepCache()
  • Method Details

    • lookup

      public static String lookup(String coords, File rootDir, long ttlHours, Supplier<String> onMiss)
      Look up the patched coordinates for coords from the local cache. On a cache miss (file absent or older than ttlHours), calls onMiss, writes the result to the cache, and returns it.
      Parameters:
      coords - Maven GAV string — "group:artifact:version"
      rootDir - project root directory (always use project.getRootDir())
      ttlHours - cache TTL in hours
      onMiss - called when the cache is cold or stale; may return null (no patch)
      Returns:
      patched GAV string, or null if no patch exists