Fork me on GitHub
#honeysql
<
2022-01-21
>
thumbnail13:01:05

Cool to see the caching feature being released! We use honeysql extensively, but most of the queries use https://www.postgresql.org/docs/8.3/queries-values.html; resulting in a dynamic amount of parameters most queries (even though most of the query is the same). Would we be able to leverage the new caching mechanic?

seancorfield18:01:51

@jeroen.dejong I'd have to see how you're generating those in HoneySQL to offer an opinion, but I suspect if the number of parameters is varying, the best you'll get is cached generation for each multiple of parameters (since it's the data structure that is used as a cache key and I think that's going to vary based on the number of parameters, right?).

thumbnail19:01:02

Yeah the amount of parameters can differ quite a lot, but we may be able to pass entire arrays through as 1 parameter; but I'm not sure about the safety in that case 😅 It would help us with keeping track of the same queries, but that's another story altogether:sweat_smile: