lightninglabs / lightninglabs/taproot-assets

[feature]: generic cache type

Open
#652 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.