diff --git a/backend/mempool-config.sample.json b/backend/mempool-config.sample.json index 1a6a52424..d0d2f486c 100644 --- a/backend/mempool-config.sample.json +++ b/backend/mempool-config.sample.json @@ -6,7 +6,7 @@ "SPAWN_CLUSTER_PROCS": 0, "API_URL_PREFIX": "/api/v1/", "POLL_RATE_MS": 2000, - "CACHE_DIR": "./cache/" + "CACHE_DIR": "./cache" }, "CORE_RPC": { "HOST": "127.0.0.1", diff --git a/backend/src/api/disk-cache.ts b/backend/src/api/disk-cache.ts index 55ff02014..cbdff49f0 100644 --- a/backend/src/api/disk-cache.ts +++ b/backend/src/api/disk-cache.ts @@ -8,8 +8,8 @@ import config from '../config'; import { TransactionExtended } from '../mempool.interfaces'; class DiskCache { - private static FILE_NAME = config.MEMPOOL.CACHE_DIR + 'cache.json'; - private static FILE_NAMES = config.MEMPOOL.CACHE_DIR + 'cache{number}.json'; + private static FILE_NAME = config.MEMPOOL.CACHE_DIR + '/cache.json'; + private static FILE_NAMES = config.MEMPOOL.CACHE_DIR + '/cache{number}.json'; private static CHUNK_FILES = 25; constructor() { } diff --git a/backend/src/config.ts b/backend/src/config.ts index f90bb4c8a..0037da6d2 100644 --- a/backend/src/config.ts +++ b/backend/src/config.ts @@ -61,7 +61,7 @@ const defaults: IConfig = { 'SPAWN_CLUSTER_PROCS': 0, 'API_URL_PREFIX': '/api/v1/', 'POLL_RATE_MS': 2000, - 'CACHE_DIR': './cache/' + 'CACHE_DIR': './cache' }, 'ESPLORA': { 'REST_API_URL': 'http://127.0.0.1:3000',