Table of Contents

Graphic-Cache SubMenu

Shipped Surface

The panel has no route and no Control-Tree node of its own. It is chrome on the Execution page (/execution): the canvas panel's expansion header carries the Meshed Geom ▾ dropdown — titled Workpiece rendering cache and geometry-diff settings — whose Graphic Cache row opens this panel in a nested menu. It hangs there because it acts on the workpiece meshed geometry's rendering cache, and its sibling row in the same dropdown is Diff Visual Radius. It is therefore only reachable while the Execution page's canvas column is shown.

The panel is self-contained: it takes no parent-supplied model. It holds local lower / upper / current values, loads them on mount, and commits each edit to GET/POST /api/preference/graphic-cache. UserService / UserConfig is the server-side model behind that endpoint.

Layout

Titled Graphic Cache (MB), with the caption “Memory budget for rendering cache. Lower & upper bound the slider.”

  • Graphic-Cache SubMenu
    • Lower numeric field (unit MB)
    • Upper numeric field (unit MB)
    • Current numeric field (unit MB)
    • Slider

Behavior

  • There is no apply step and no Save button: each field posts its own value the moment it is committed — on blur, or on Enter — and the whole panel is loaded once when it is mounted.
  • The Current field is bounded by the two limit fields, so a value below Lower or above Upper is refused with an inline message and never sent. The server clamps a submitted value into the limits regardless, and the panel re-applies the effective state that comes back, so the server's answer is always what ends up on screen.
  • The slider is integer-valued and reflects Current in MB. Its range tracks Lower / Upper, clamped defensively so the minimum never exceeds the maximum. Releasing the slider commits the value.
  • A failed write shows the message inline under the fields, raises a notification, and re-reads from the server so the panel never drifts from stored state.
  • A write lands on the live user configuration, so it takes effect at once — GraphicCacheMb is a pass-through onto CubeTree.DispCacheMb. All three values are part of the user-config XML, so they reach disk with the next save of that config.

Source Code Path

See HiNC App Anatomy for git repository links.

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/components/preference/GraphicCacheMenu.vue — the panel itself: Lower / Upper / Current numeric fields plus the slider. Loads on mount, commits each edit to the REST endpoint, re-applies the server's clamped response, and reports failures inline plus a notification.
  • wwwroot-src/src/components/execution/ExecutionExtendedToolBar.vue — where the entry hangs: the Meshed Geom ▾ dropdown on the Execution page canvas panel's expansion header, whose Graphic Cache row opens this panel in a nested menu.
  • wwwroot-src/src/components/workpiece/WorkpieceDiffRadiusMenu.vue — the sibling Diff Visual Radius row in the same dropdown.
  • wwwroot-src/src/components/widgets/NumericInput.vue — the shared numeric field used for all three values.
  • wwwroot-src/src/api/preference.tsgetGraphicCache / setGraphicCache over GET/POST /api/preference/graphic-cache, typed as { lowerLimit, upperLimit, value }.
  • Environments/PreferenceController.csGetGraphicCacheSettings returns { success, lowerLimit, upperLimit, value }; UpdateGraphicCacheSettings takes the same three as nullable fields, clamps value into the limits, writes the live UserConfig, and returns the effective state.
  • Environments/UserConfig.csGraphicCacheLowerLimitMb (default 10) and GraphicCacheUpperLimitMb (default 1200) are plain stored values; GraphicCacheMb is a pass-through whose getter and setter are CubeTree.DispCacheMb. All three round-trip through the config XML.

See Also