Skip to content

IOTypeCache

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/tandem/blob/main/js/IOTypeCache.ts for the most up-to-date information.

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.