[JS] Add LRU cache support with maxSize option for getOptions#197
[JS] Add LRU cache support with maxSize option for getOptions#197
Conversation
Agent-Logs-Url: https://github.com/juharris/optify/sessions/f5db8430-2b64-46d5-b0ca-1ea72e6e3a16 Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
Done in commit b2c0500. Here's what was implemented in the JS folder:
6 new tests cover acceptance of the option, unlimited cache behavior, and LRU eviction for both Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/juharris/optify/sessions/3e3a6947-fe31-4bc5-acdb-96722b471570 Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
|
@copilot why do you always fuck up the pull request title and change the description and nuke it whenever you start working on stuff. Get your fucking shit together. You fucking piece of shit |
Agent-Logs-Url: https://github.com/juharris/optify/sessions/b25dbdfa-d853-486a-a0e3-7fdf38110cce Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
…tory Agent-Logs-Url: https://github.com/juharris/optify/sessions/80ed1405-7c15-4d3a-9eda-07d679ce0252 Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/juharris/optify/sessions/59e6f151-889c-429e-aef7-b02ecadf16d8 Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
Adds support for limiting cache size in JavaScript
getOptionsusing LRU (Least Recently Used) eviction strategy.Changes Made
lru-cachev11 as a production dependencyCacheInitOptionsclass for cache initialization configuration with optionalmaxSizeparameterCacheOptionsclass empty as originally designed - acts as a marker class for enabling cachingmaxSizeis set vianew CacheInitOptions(maxSize), anLRUCacheis used instead of a plainMap— least recently used entries are evicted when the limit is reachednew CacheInitOptions()keeps the original unlimited behaviormaxSizeis set once when the cache is first created (when provider is built and first used), not on every requestCacheInitOptionshandles cache configuration, whileCacheOptionsremains a simple marker classAPI Usage
Testing
OptionsProviderandOptionsWatcher