When I use
FromCache
orFromeCacheFirstOrDefault
, what is the behavior when the item is not in the cache? Do I need to run a separate query to load the data from the real DB, or do those methods fall back to querying the DB for me?Does the cache persist across multiple instances of my
DbContext
? Or is there a separate cache for each instance ofDbContext
?When I get an object from the cache to use as a foreign key, do I need to attach it to the
DbContext
or should it be already attached? Or does it matter?How does it work with the Local collection? If I call
Add
onDbSet
, can I then get that object from the Cache before callingSaveChanges()
?
I originally posted these questions on GitHub but didn't get any traction: https://github.com/loresoft/EntityFramework.Extended/issues/111