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 a Graphic Cache button — titled Memory budget of the workpiece rendering cache — whose menu is this panel. It hangs there because it acts on the workpiece meshed geometry's rendering cache. It has no sibling row: the Diff Visual Radius it once shared a Meshed Geom ▾ dropdown with moved to the Program branch's Geometry Difference result node, and that dropdown is gone. It is therefore only reachable while the Execution page's canvas column is shown, though the button itself is not gated on a loaded project, since its endpoint is project-less.

The panel is self-contained: it takes no parent-supplied model. It holds local lower / upper / current values, loads them on mount and again every time the menu is reopened, 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 when it is mounted and re-read from the server each time the menu is reopened, so a value changed elsewhere shows up on the next open.
  • 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 the current value into the limits on every update — also when only a limit moved, so raising Lower above Current answers with Current raised to match — 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 and on every reopen (an active prop from the host), 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 Graphic Cache button on the Execution page canvas panel's expansion header, whose q-menu holds this panel.
  • wwwroot-src/src/components/widgets/NumericInput.vue — the shared numeric field used for all three values.
  • wwwroot-src/src/api/preference.ts — getGraphicCache / setGraphicCache over GET/POST /api/preference/graphic-cache, typed as { lowerLimit, upperLimit, value }.
  • Environments/PreferenceController.cs — GetGraphicCacheSettings returns { success, lowerLimit, upperLimit, value }; UpdateGraphicCacheSettings takes the same three as nullable fields, writes the limits, re-clamps the current value into them on every update (a fractional lower limit rounds it up, a fractional upper limit rounds it down), writes the live UserConfig, and returns the effective state.
  • Environments/UserConfig.cs — GraphicCacheLowerLimitMb (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