Skip to content

IOTypeCache

Overview

A cache that helps reuse parametric IOTypes so they aren't dynamic created upon each usage. This also has the feature of keeping a registry of all caches. This is predominantly used to clear an API and start over in phetioEngine.

@author Michael Kauzmann (PhET Interactive Simulations) @author Sam Reid (PhET Interactive Simulations)

Class IOTypeCache

By default, the cache key is an IOType (like for a single parameter like PropertyIO)

import { IOTypeCache } from 'scenerystack/tandem';

Constructor

new IOTypeCache( entries? : readonly ( readonly [ T, IOType ] )[] | null )

Instance Methods

Static Methods

clearAll()

Source Code

See the source for IOTypeCache.ts in the tandem repository.