Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dlongley opened this issue Dec 2, 2022 · 1 comment

Comments

@dlongley
Copy link
Member

dlongley commented Dec 2, 2022

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.).

@dlongley
Copy link
Member Author

dlongley commented Dec 2, 2022

Ideally, this feature would be added to a library like lru-memoize so it could be reused here (and elsewhere as needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant