Skip to content

Commit 46c3db9

Browse files
committed
chore: remove caching
1 parent 38f80d2 commit 46c3db9

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/controllers/legacy/amm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { Router } from 'express';
22
import Joi from 'joi';
33

4+
import { getOnChainData, parseApyHistoryData } from './amm.utils';
5+
46
import { LONG_CACHE_TTL, MEDIUM_CACHE_TTL } from '~/config/constants';
57
import { apyDayRepository } from '~/database/repository/apy-day-repository';
68
import { maybeCacheResponse } from '~/utils/cache';
79
import { toResponse } from '~/utils/http-response';
810
import { asyncRoute } from '~/utils/route-wrapper';
911
import { validate } from '~/utils/validation';
1012

11-
import { getOnChainData, parseApyHistoryData } from './amm.utils';
12-
1313
const router = Router();
1414

1515
router.get(

src/controllers/legacy/cmc.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Router } from 'express';
22

33
import { prepareSummary } from './cmc.utils';
44

5-
import { LONG_CACHE_TTL } from '~/config/constants';
5+
import { DEFAULT_CACHE_TTL } from '~/config/constants';
66
import { networks } from '~/loader/networks';
77
import { NetworkFeature } from '~/loader/networks/types';
88
import { prepareTvlEndpoint, prepareTvlSummaryEndpoint } from '~/loader/tvl/prepare-tvl-endpoint-data';
@@ -16,7 +16,7 @@ const router = Router();
1616
router.get(
1717
'/summary',
1818
asyncRoute(async (req, res) =>
19-
maybeCacheResponse(res, 'legacy/cmc/summary', async () => prepareSummary(), LONG_CACHE_TTL).then((data) =>
19+
maybeCacheResponse(res, 'vf:legacy/cmc/summary', async () => prepareSummary(), DEFAULT_CACHE_TTL).then((data) =>
2020
res.json(toResponse(data)),
2121
),
2222
),
@@ -28,9 +28,9 @@ router.get(
2828
asyncRoute(async (req, res) =>
2929
maybeCacheResponse(
3030
res,
31-
`v1:legacy/cmc/tvl/${req.app.locals.network.name}`,
31+
`vf:legacy/cmc/tvl/${req.app.locals.network.name}`,
3232
async () => prepareTvlEndpoint(req.app.locals.network),
33-
LONG_CACHE_TTL,
33+
DEFAULT_CACHE_TTL,
3434
).then((data) => res.json(toResponse(data))),
3535
),
3636
);
@@ -40,9 +40,9 @@ router.get(
4040
asyncRoute(async (req, res) =>
4141
maybeCacheResponse(
4242
res,
43-
'legacy/cmc/tvl/summary',
43+
'vf:legacy/cmc/tvl/summary',
4444
async () => prepareTvlSummaryEndpoint(networks.listChains()),
45-
LONG_CACHE_TTL,
45+
DEFAULT_CACHE_TTL,
4646
).then((data) => res.json(toResponse(data))),
4747
),
4848
);

src/controllers/legacy/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Router } from 'express';
22

3-
import { NetworkFeature } from '~/loader/networks/types';
4-
import { networkAwareMiddleware } from '~/middleware/network-middleware';
5-
63
import ammRouter from './amm';
74
import cmcRouter from './cmc';
85

6+
import { NetworkFeature } from '~/loader/networks/types';
7+
import { networkAwareMiddleware } from '~/middleware/network-middleware';
8+
99
const router = Router();
1010

1111
router.use('/amm', networkAwareMiddleware([NetworkFeature.legacy]), ammRouter);

0 commit comments

Comments
 (0)