query plan caching (sql server) Is there a measure of time frame as to which the execution plan of inline queries will cached?
There is an algorithm (will find it), but practically it will stay there:


while being used (Edit: See AdaTheDev's answer)
until statistics update (also implied by index rebuild)
until definition changes (including whitespace and case)
SQL instance restart
until severe memory pressure


SQL Server 2008 article