1

after enableling querycaching in craft3 I found rows in templatecachequeries with big amount of characters in the query field. I decoded it with base64 and got this as the largest entry:

query_length: 157036

query_decoded:
O:28:"craft\elements\db\EntryQuery":71:{s:8:"editable";b:0;s:9:"sectionId";a:1:{i:0;s:1:"7";}s:6:"typeId";N;s:8:"authorId";N;s:13:"authorGroupId";N;s:8:"postDate";N;s:6:"before";N;s:5:"after";N;s:10:"expiryDate";N;s:17:" 

query: TzoyODoiY3JhZnRcZWxlbWVudHNcZGJcRW...(+157.000)

my sql query:

select length(query) as query_length , FROM_BASE64(query) as query_decoded, query
from craft_templatecachequeries
order by query_length desc

why does the unencoded query with a size of 221 characters get encoded to a size of 157036 characters?

1

turns out it was an error in my TablePlus, it truncated the decoded_query to 221 characters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.