added cache mechanism to prevent long verify times