Closed rts-gordon closed 1 year ago
Hi @Pacific73 I noticed that there are four Cache level:
const ( CacheLevelOff CacheLevel = 0 CacheLevelOnlyPrimary CacheLevel = 1 CacheLevelOnlySearch CacheLevel = 2 CacheLevelAll CacheLevel = 3 )
What's the difference between Search cache and Primary cache, or All cache? Thanks a lot.
Primary cache gets objects cached when you use db.Where("id IN (?)", []int{1,2,3}). It's based on primary key, a.k.a, id.
Search cache gets objects cached using complete SQL as key.
Hi @Pacific73 I noticed that there are four Cache level:
What's the difference between Search cache and Primary cache, or All cache? Thanks a lot.