RAD function: cache.flush

A RAD function that removes the specified item from the memory cache.

Function

cache.flush

Format

cache.flush( nType, pItem )

Parameters

nType is a number from 1 to 4 representing the type of flush operation. Flush types 1, 2, and 4 remove the item from the global shared memory cache. Flush type 3 removes the item from the local format cache.

  • 1 flushes application/code records
  • 2 flushes dbdicts
  • 3 flushes formats
  • 4 flushes SQL maps

pItem is the name of the item to flush enclosed in quotation marks. Note that pItem is not used if flush type is 3.

Factors

This function returns no value.

Example

To flush the dbdict record for the probsummary table:

cache.flush( 2, "probsummary" )

To flush the local format cache:

$L.type = 3
cache.flush( $L.type )