Why bother caching queries that are pretty quick to generate? Most caching around ORMs focuses on caching the results of the query since they require more resources to generate.
well if you're using an interpreted language without any sort of build step then I suppose that's all you can do, but if your backend is written in a compiled language with compile-time execution functionality, then it seems useful to do stuff like this then, instead of at run-time, likely multiple times per request—that's a lot of unnecessarily repeated string-building, without any benefit for doing so!