digitalbazaar / digitalbazaar/bedrock-tokenization
Consider adding optimistic memoize-cache refresh for latest tokenizer batch versions
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
- 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
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