Skip to content

[execution-layer] - Implement TTL-based caching layer for APR/APY/TVL data #39

@Txrmarcos

Description

@Txrmarcos

Create shared/cache.ts utility with getCached(cache, key) and setCache(cache, key, value, ttlMs) functions (currently referenced but not implemented in aerodrome.service.ts). Apply to: pool APR (TTL 30s), TVL (TTL 30s), gauge rewards (TTL 60s). Use in-memory Map with expiry timestamps. Files: new backend/src/shared/cache.ts, update backend/src/shared/services/aerodrome.service.ts, backend/src/modules/liquid-staking/usecases/get-protocol-info.usecase.ts.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions