lightninglabs / lightninglabs/taproot-assets
[feature]: generic cache type
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 525
- Forks
- 150
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
**Is your feature request related to a problem? Please describe.**
https://github.com/lightninglabs/taproot-assets/pull/626#pullrequestreview-1713405292
> LGTM, big lift with all the new caches + rewiring DB calls + other misc fixes!
>
> Excited to have this in, I think we have some smaller tasks to spin off re: generic caches and proof encode.
**Describe the solution you'd like**
New type in `fn` that implements a thread-safe cache with appropriate callbacks s.t. it can be used where caches were added in #626. Would probably also want a type for a tiered / 2-level cache / cache of caches.
**Describe alternatives you've considered**
Copypasta.
**Additional context**
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the cache additions and database-call rewiring in pull request #626, then inspect the `fn` package where the generic cache would live. Define the thread-safe cache API and callbacks needed for those existing cache sites, and determine whether a tiered or two-level cache is also in scope. Done means the cache can replace the relevant duplicated implementations with appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100