In my personal opinion, there are a few advantages of resizing -
1) The size of the cache is unpredictable as there is a fixed(guesstimate) accounting for the key size. With a resizable cache, we can potentially cache heavier queries and exploratively resize the cache when faced with memory pressure. 2) With a resizable cache, we can control memory allocation dynamically based on the workload. For a large cache, dropping the entire cache when we want to reallocate some memory seems like an excessive action. 3) The query cache effectiveness is very workload dependent. I have observed the cache hit-rate can be in single digits for certain workloads and memory can be effectively used elsewhere. Adithya On Thu, Mar 5, 2020 at 11:04 AM Adrien Grand <jpou...@gmail.com> wrote: > Why do you need to resize it? And if you need to resize it, would it be > good enough to drop the old cache and start using a new one? > > On Thu, Mar 5, 2020 at 12:54 AM Aadithya C <aadithy...@gmail.com> wrote: > > > Hi, > > > > We are looking at implementing a setter function to resize the > > LRUQueryCache on demand and evict the least recently used queries. Please > > share any thoughts or concerns around this subject. > > > > Adithya > > > > > -- > Adrien >