http://coldfusion.com logo
#lucee
Title
# lucee
b

Brandon Brown

04/08/2022, 7:51 PM
Does anyone know how I would be able to determine the Redis cache key Lucee generates for queries using CFML? I want to do some cache busting. I know about the query "tags" but when you have hundreds of thousands of Redis cache entries it is very slow since it will loop over every single entry in Redis. I looked at the source code of Lucee and have tried to replicate it but I can't seem to come up with a matching key it honestly isn't even close.
a

Adam Cameron

04/09/2022, 2:16 PM
This would be the sort of thing that would be handy to return in the
result
variable of a query.
b

Brandon Brown

04/12/2022, 12:44 PM
I agree it would be super helpful
z

zackster

04/13/2022, 5:04 PM
It's a hash of query attributes, Params and sql
b

Brandon Brown

04/14/2022, 4:49 PM
@zackster do you know where in the source code it is generated or do you have an example of CFML that can reproduce the hash?
b

Brandon Brown

04/14/2022, 5:13 PM
thanks
z

zackster

04/14/2022, 5:31 PM
do you want to be able to bust the cache for a specifc query?
b

Brandon Brown

04/14/2022, 5:32 PM
Yes but the
tags
attribute on the query is very slow when there are hundreds of thousands of items in the cache
z

zackster

04/14/2022, 5:33 PM
yeah, so go ahead and file a bug asking to include the cacheid in the result
5 Views