package toffee

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Toffee.Cache_treeSource

Sourcetype 'context t = 'context tree
Sourceval cache_get : 'context t -> Node_id.t -> known_dimensions:float option Geometry.size -> available_space:Available_space.t Geometry.size -> run_mode:Run_mode.t -> Layout_output.t option

cache_get tree node_id ~known_dimensions ~available_space ~run_mode retrieves the cached layout output for node_id under the given constraints.

Returns Some output if a valid cached result exists; None if the cache is invalid or empty.

Sourceval cache_store : 'context t -> Node_id.t -> known_dimensions:float option Geometry.size -> available_space:Available_space.t Geometry.size -> run_mode:Run_mode.t -> Layout_output.t -> unit

cache_store tree node_id ~known_dimensions ~available_space ~run_mode output stores output in the cache for node_id under the given constraints.

Sourceval cache_clear : 'context t -> Node_id.t -> unit

cache_clear tree node_id invalidates all cached layouts for node_id.