digitalbazaar / digitalbazaar/bedrock-tokenization

Consider adding optimistic memoize-cache refresh for latest tokenizer batch versions

Open
#88 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3
Forks
2
Avg merge
5m
Merged PRs (30d)
1

Description

Whenever the cached batch version expires for a tokenizer, a hit to the database occurs during the lookup. Ideally, the cache would use memoized promises instead and, shortly before the record expires, a background call would be made to look up the batch version and refresh it in the cache (provided the cache had room, etc.).

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

Start by tracing the tokenizer batch-version cache and the database lookup that runs when a cached version expires. Define how memoized promises, pre-expiry background refreshes, and available cache capacity should interact, then verify the chosen behavior with tests for expiry and refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.