• 1. Did you check SQL Server log file? Every time Cachestore is flushed it records it to SQL Server Log along the reason why it was flushed.

    2. From your post it looks that SQL Server spends 30 min to create a plan that executes for 1 sec. Did you check the plan itself? Does it make a sence? How about statistics? Is it up to date? Are you using Linked Server by any chance?