You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While bounding the compiled Vue assets (vue_asset_max_bytes) and making the Vue asset store check a shared cache at most once per asset per minute, a sweep of packages/py/citry/citry/ext/dependencies/ found the same patterns there. Left for a separate change:
Round trips on every render. _cache_component_script (scripts.py) reads the versioned and the stable key with cache.get and compares the full payload on each call, _cache_component_css_vars_capture does the same per distinct css_data() result, and cache_asset calls has (then set) for every served Dependencies file, after which emission.py reads the same key back with get. With Redis this is several network calls per component per render. The helper citry.cache._store_if_missing (remember per engine which keys were seen stored, recheck after an interval, forget on Citry.clear()) fits cache_asset, but emission then reads the entry back and raises TypeError when it is missing, so that read must first fall back to re-storing (or use the content in hand) before the helper can be used safely.
Growth of the default in-memory cache. Each distinct css_data()/js_data() result is stored as its own entry without a TTL. When those values vary per request (a per-user colour, say), the default unbounded InMemoryCache grows with traffic, not with code. The Vue assets now live in a bounded per-process store when no cache is configured; the per-instance variables scripts need a similar decision (a bound, or keeping them out of the shared default cache).
Activity
fix: keep css_data() stylesheets within vue_asset_max_bytes without a…
fix: keep css_data() stylesheets within vue_asset_max_bytes without a…