clearCache

View as MarkdownOpen in Claude

Clear the validation result cache. Useful when the schema has been reloaded or when you want to force re-validation.

Parameters

None.

Returns

void

Example

import { SchemaUtils } from '@signalwire/sdk';
const schema = new SchemaUtils();
schema.validate(someDocument);
schema.clearCache();
console.log(schema.getCacheSize()); // 0