Clear all EC2 cached data. Useful for testing or when you need to free memory.
import { clearEC2Cache, getEC2CacheStats } from 'aws-instance-info'console.log(getEC2CacheStats()) // { instances: 10, families: 3, infoLoaded: true }clearEC2Cache()console.log(getEC2CacheStats()) // { instances: 0, families: 0, infoLoaded: false } Copy
import { clearEC2Cache, getEC2CacheStats } from 'aws-instance-info'console.log(getEC2CacheStats()) // { instances: 10, families: 3, infoLoaded: true }clearEC2Cache()console.log(getEC2CacheStats()) // { instances: 0, families: 0, infoLoaded: false }
Clear all EC2 cached data. Useful for testing or when you need to free memory.