topdown: Insert serialized data in inter-query cache
Previously when inserting an item in the inter-query cache, only the size of the raw string representing the HTTP response message body was used to calculate the amount of memory used by the item. This was errornous as the actual item inserted in the cache would hold not only the raw string but also the JSON representation of the message body. The deserialized JSON body would end up consuming as much as 20x more memory compared to the JSON encoded version of the same data. As a result, the cache would end up consuming more memory than the user-defined cache size limit. This change serializes the data that will be inserted in the inter-query cache so as to get a more accurate representation of the size of the cache. Fixes: #3042 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
A
Ashutosh Narkar committed
1d747866e6033db9e37d548994b481635818a862
Parent: 99c81ca