getCacheSize

View as MarkdownOpen in Claude

Get the number of cached validation results.

Parameters

None.

Returns

number — The current cache entry count.

Example

1import { SchemaUtils } from '@signalwire/sdk';
2
3const schema = new SchemaUtils();
4schema.validate(doc1);
5schema.validate(doc2);
6console.log(schema.getCacheSize()); // 2