Persist Entity Framework query cache
问题 I have an ASP.NET MVC 5 web-application and use EF 6.1 to access my DB. I have some rather complex LINQ queries which take up to 10s to compile, but then execute in a few milliseconds. EF does cache this queries fine and the second time the query is executed it returns within this few milliseconds. But this cache is not persisted so on every app-restart the query needs to be recompiled, which takes that 10s again. Is there a way to persist this query cache so it survives an app-restart? 回答1: