Skip to content

Code-table caching

Loads and caches PPD and reserve-services reference code tables in module-level Static variables, avoiding repeated database round-trips within a process.

Field Value
Operation ID code-table-caching
Trigger First call to an mdlPPD or mdlReserveServices accessor function, or an explicit Refresh argument
Inputs Optional Refresh boolean
Outputs Cached code-table collections
Primary components mdlPPD, mdlReserveServices
Entry point SAIF.Business.Claim/mdlPPD.vb

Steps

  1. Caller invokes an accessor function on mdlPPD (e.g., for PPD body parts) or mdlReserveServices.
  2. If the module-level Static cache variable is empty, or Refresh = True is supplied, load the code table:
  3. PPD body parts (SQL-026, CL_PPD_BODY_PART_CODE).
  4. Vocational service types (SQL-035, CL_RESERVE_VOC_SERV_TYPE_CODE).
  5. Otherwise, return the previously cached collection without querying the database.
  6. The cache persists for the lifetime of the hosting process; there is no expiry and no synchronization.*

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Accessor function called]) --> Cached{Static cache populated<br>and Refresh = False?}
    Cached -->|Yes| Return([Return cached collection])
    Cached -->|No| Load["Query code table from<br>database"]
    Load --> Store["Store into Static cache<br>variable"]
    Store --> Return

Failure and edge-case behavior

  • The cache has no expiry and no synchronization, making it process-lifetime and not thread-safe; concurrent ASP.NET requests share the same cached state.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.Claim/mdlPPD.vb
  • SAIF.Business.Claim/mdlReserveServices.vb