Eppo-exp / node-server-sdk

Eppo Node.js SDK
MIT License
9 stars 0 forks source link

reduce duplicate assignment logger invocations by instantiating with an LRU cache; use commons v1.7.0 #37

Closed leoromanovsky closed 10 months ago

leoromanovsky commented 11 months ago

Fixes: #issue

Motivation and Context

defaults to using the lru cache to reduce duplicate assignments.

since this is this is a server-side sdk we expect many more keys in this cache from a variety of subjects. to determine a sensible default to decided to arbitrarily limit it to approximately 10 mb of memory - this seems small enough to not bring a lot of attention to itself.

worked with chatgpt to understand the memory usage of lru-cache:

Screenshot 2023-10-18 at 11 30 55 PM Screenshot 2023-10-18 at 11 30 44 PM

Description

How has this been tested?