3
  1. When I use FromCache or FromeCacheFirstOrDefault, 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?

  2. Does the cache persist across multiple instances of my DbContext? Or is there a separate cache for each instance of DbContext?

  3. 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?

  4. How does it work with the Local collection? If I call Add on DbSet, can I then get that object from the Cache before calling SaveChanges()?

I originally posted these questions on GitHub but didn't get any traction: https://github.com/loresoft/EntityFramework.Extended/issues/111

Brannon
  • 5,324
  • 4
  • 35
  • 83

0 Answers0