CACHE

Turn on/off software caching of tables

CACHE

Show or change which tables the SDK keeps a software copy of. Without arguments it prints Caching is off for: and Caching is on for:, each followed by table names as <table>.<block>; this form is read-only. On a SONiC Trident 3 switch the list runs to about 1800 lines (roughly 1000 uncached and 770 cached table copies, several per line for per-port tables). Tables are listed under their own names, not aliases: VLAN_TAB, for example, appears as VLAN.ipipe0, in the cached list.

cache +<TABLE>[.<COPY>] … (or a bare name) turns caching on, cache -<TABLE>[.<COPY>] … turns it off. Tables that cannot be cached are refused. Changing this changes how the SDK reads those tables (cached tables are read from memory, and MemSCAN only checks cached tables).

Hardware-validated

drivshell> cache
Caching is off for:
     AGM_MONITOR_TABLE.ipipe0
     CLPORT_WC_UCMEM_DATA.clport0 CLPORT_WC_UCMEM_DATA.clport1 CLPORT_WC_UCMEM_DATA.clport2 CLPORT_WC_UCMEM_DATA.clport3 CLPORT_WC_UCMEM_DATA.clport4 CLPORT_WC_UCMEM_DATA.clport5 CLPORT_WC_UCMEM_DATA.clport6 CLPORT_WC_UCMEM_DATA.clport7 CLPORT_WC_UCMEM_DATA.clport8 CLPORT_WC_UCMEM_DATA.clport9 CLPORT_WC_UCMEM_DATA.clport10 CLPORT_WC_UCMEM_DATA.clport11 CLPORT_WC_UCMEM_DATA.clport12 CLPORT_WC_UCMEM_DATA.clport13 CLPORT_WC_UCMEM_DATA.clport14 CLPORT_WC_UCMEM_DATA.clport15 CLPORT_WC_UCMEM_DATA.clport16 CLPORT_WC_UCMEM_DATA.clport17 CLPORT_WC_UCMEM_DATA.clport18 CLPORT_WC_UCMEM_DATA.clport19 CLPORT_WC_UCMEM_DATA.clport20 CLPORT_WC_UCMEM_DATA.clport21 CLPORT_WC_UCMEM_DATA.clport22 CLPORT_WC_UCMEM_DATA.clport23 CLPORT_WC_UCMEM_DATA.clport24 CLPORT_WC_UCMEM_DATA.clport25 CLPORT_WC_UCMEM_DATA.clport26 CLPORT_WC_UCMEM_DATA.clport27 CLPORT_WC_UCMEM_DATA.clport28 CLPORT_WC_UCMEM_DATA.clport29 CLPORT_WC_UCMEM_DATA.clport30 CLPORT_WC_UCMEM_DATA.clport31
     CNG_STRENGTH_PROFILE.ipipe0
     COS_MAP_SEL.ipipe0
     CPU_COS_MAP_DATA_ONLY.ipipe0
     CPU_COS_MAP_ONLY.ipipe0
     CPU_PBM.ipipe0
     CPU_PBM_2.ipipe0
     CTRL_PKT_SIGNATURE_1.ipipe0
     CTRL_PKT_SIGNATURE_2.ipipe0
     CTRL_PKT_SIGNATURE_3.ipipe0
     CTRL_PKT_SIGNATURE_4.ipipe0
     DEVICE_LOOPBACK_PORTS_BITMAP.ipipe0
     DLB_ECMP_ETHERTYPE_ELIGIBILITY_MAP.ipipe0
     DLB_ECMP_FLOWSET.ipipe0
     DLB_ECMP_FLOWSET_PIPE0.ipipe0
     DLB_ECMP_FLOWSET_PIPE1.ipipe0
     DLB_ECMP_GLB_QUANTIZE_THRESHOLD.ipipe0
     DLB_ECMP_GROUP_CONTROL.ipipe0
     DLB_ECMP_LINK_CONTROL.ipipe0
     DLB_ECMP_PORT_QUALITY_UPDATE_MEASURE_CONTROL.ipipe0
     DLB_ECMP_PORT_QUALITY_UPDATE_MEASURE_CONTROL_PIPE0.ipipe0
     DLB_ECMP_PORT_QUALITY_UPDATE_MEASURE_CONTROL_PIPE1.ipipe0
     DLB_HGT_LAG_ETHERTYPE_ELIGIBILITY_MAP.ipipe0
     DLB_HGT_LAG_FLOWSET.ipipe0
     DLB_HGT_LAG_FLOWSET_PIPE0.ipipe0
     DLB_HGT_LAG_FLOWSET_PIPE1.ipipe0
     DLB_HGT_LAG_GLB_QUANTIZE_THRESHOLD.ipipe0
     DLB_HGT_LAG_GROUP_CONTROL.ipipe0
...

Unvalidated

drivshell> cache -VLAN_TAB

Built-in help

Parameters: [+<TABLE>[.COPYNO] | -<TABLE>[.COPYNO]] ...
    If no parameters are given, displays caching status.  Otherwise,
    turns software caching on (+) or off (-) for specified TABLE(s).
    Use "listmem" for a list of tables and cachability.

Further reading

BCM_SDK命令.