diff --git a/README.md b/README.md index 350ba4c..b8b0fb8 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Here are the available configuration options: | `settings.feeMultiplier` | The multiplier to apply to the fee estimates | `1` | `FEE_MULTIPLIER` | | `settings.feeMinimum` | The minimum fee (sat/vB) to use for fee estimates if we could not determine from a configured data source | `2` | `FEE_MINIMUM` | | `settings.maxHeightDelta` | The maximum acceptable difference between the block heights of the most current fee estimates. | `3` | `MAX_HEIGHT_DELTA` | -| `cache.stdTTL` | The standard time to live in seconds for every generated cache element | `15` | `CACHE_STDTTL` | +| `cache.stdTTL` | The standard time to live in seconds for every generated cache element | `15` | `CACHE_STD_TTL` | | `cache.checkperiod` | The period in seconds, used for the automatic delete check interval | `20` | `CACHE_CHECKPERIOD` | ### Mempool settings diff --git a/bun.lockb b/bun.lockb index 0eb7aea..a760b9d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/server.tsx b/src/server.tsx index 8e022a2..d9753d6 100644 --- a/src/server.tsx +++ b/src/server.tsx @@ -36,7 +36,7 @@ const TIMEOUT = config.get("settings.timeout"); const FEE_MULTIPLIER = config.get("settings.feeMultiplier"); const FEE_MINIMUM = config.get("settings.feeMinimum"); const MAX_HEIGHT_DELTA = config.get("settings.maxHeightDelta"); -const CACHE_STDTTL = config.get("cache.stdTTL"); +const CACHE_STD_TTL = config.get("cache.stdTTL"); const CACHE_CHECKPERIOD = config.get("cache.checkperiod"); const log = logger(LOGLEVEL, "server"); @@ -51,7 +51,7 @@ log.info(config.util.toObject()); // Register data provider service. const service = new DataProviderManager( { - stdTTL: CACHE_STDTTL, + stdTTL: CACHE_STD_TTL, checkperiod: CACHE_CHECKPERIOD, }, MAX_HEIGHT_DELTA, @@ -125,7 +125,7 @@ app.get("/", async (c) => { try { data = await service.getData(); // Set cache headers. - c.res.headers.set("Cache-Control", `public, max-age=${CACHE_STDTTL}`); + c.res.headers.set("Cache-Control", `public, max-age=${CACHE_STD_TTL}`); } catch (error) { log.error(error); data = { @@ -158,7 +158,7 @@ app.get("/v1/fee-estimates", async (c) => { data = await service.getData(); // Set cache headers. - c.res.headers.set("Cache-Control", `public, max-age=${CACHE_STDTTL}`); + c.res.headers.set("Cache-Control", `public, max-age=${CACHE_STD_TTL}`); // Return the estimates. return c.json(data);