Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # IT:AD:EF:HowTo:Second Level Caching # <callout type="Navigation" class="small"> * [[../|(UP)]] {{indexmenu>.#2|nsort tsort}} </callout> <panel title="Summary"> A slightly surprising fact about EF is that even if it has already retrieved a record, if you query it again, it will contact the db and retrieve it again (there is no caching going on). It's only in the way it decides to update or discard the in-memory object that can be changed. The default behaviour is to compare on id (to make it sure it's already in mem) and discard it if it is -- with any changes that may have already been applied, and just been retrieved.... </panel> ## Process ## If you are stuck with only one server, and need the boost -- I'd highly question the decision though -- you could consider: * https://efcache.codeplex.com/ * See also: * http://www.codeproject.com/Articles/435142/Entity-Framework-Second-Level-Caching-with-DbConte /home/skysigal/public_html/data/pages/it/ad/ef/howto/second_level_caching.txt Last modified: 2023/11/04 01:42by 127.0.0.1