The ThreatDetector class is designed to be used with a cache storage adapter to reduce the number of API calls needed to perform an asset scan. This is done by storing the results of previous API calls in the cache and retrieving them when needed.

Depending on what environment you are using the SDK in, you may need to use the appropriate storage adapter.

Adapters

AdapterDescription
BrowserStores the cached data in the browser’s local storage.
ExtensionStores the cached data in the browser’s extension storage.
MemoryStores the cached data in memory. This is the default adapter.

Are we missing an adapter? Feel free to reach out to us at [email protected] and we’ll be happy to discuss implementing it.