Does the Linq2DB ORM support query result caching - first level or second level? I noticed the namespace LinqToDB.Common.Internal.Cache
, does it mean caching has to be built by the consuming application through a custom caching manager?
Asked
Active
Viewed 461 times
1 Answers
2
Well, linq2db
is designed to work with queries not object management. Caching is a very specific case which introduces a lot of side effects. For example if you change some field and the cache contains such records - you have to invalidate the cache, otherwise the system will return obsolete data. Invalidating caches is the most difficult part here.
Anyway there are third party libraries which can do that for you: LinqCache
Probably there are other libraries which can do similar things.

CodeFox
- 3,321
- 1
- 29
- 41

Svyatoslav Danyliv
- 21,911
- 3
- 16
- 32
-
Do you know if there is native support for caching (maybe via LinqToDB.Common.Internal.Cache) when the data access is read-only? – arung Mar 15 '21 at 05:28
-
This namespace is used for caching mappers, translated queries. I'm one. of the `linq2db` creators, so believe me - there are nothing about caching objects. – Svyatoslav Danyliv Mar 15 '21 at 05:45