Cache GetLastUpdateTimestamp result
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
**Context**
We recently improved a lot performances by caching file content, websites file paths, headers and MNS. But we still check on chain LastUpdateTimestamp at each request which is slow. That could be fixed by creating a simple [expirable LRU cache](https://github.com/hashicorp/golang-lru/blob/main/README.md#expirable-lru-cache-example). We could ask it to expire every 16 sec (by default?) as an address shouldn't update multiple a website within 16 sec
**TODO**
- [ ] Create a basic [LRU expirable cache](https://github.com/hashicorp/golang-lru/blob/main/README.md#expirable-lru-cache-example) that stored a last update timestamp with the corresponding website address as key
- [ ] store timestamps in cache
- [ ] check cache before fetching timestamps
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating GetLastUpdateTimestamp and the request path that fetches on-chain timestamps. Read the expirable LRU cache example linked in the issue and verify the intended 16-second expiration. Done means website addresses key cached timestamps, cache hits avoid fetching, and timestamps are stored after fetching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100