Dean
12/16/2022, 1:57 AM<cfquery name ="test" datasource="#mydsn#" tags="mytag" cachedwithin="#createTimespan(1,0,0,0)#">
select * from myTable
</cfquery>
<cfscript>
writedump(var=test, expand=false)
cacheClear(filter=listToArray("mytag"),cachename= 'querycache')
</cfscript>
I get:
lucee.runtime.exp.NativeException: java.lang.NullPointerException
at lucee.runtime.cache.util.QueryTagFilter.accept(QueryTagFilter.java:27)
at lucee.extension.io.cache.redis.CacheSupport.remove(CacheSupport.java:88)
at lucee.runtime.functions.cache.CacheClear._call(CacheClear.java:111)
at lucee.runtime.functions.cache.CacheClear.call(CacheClear.java:69)
at dean_cfm$cf$i.call(/dean.cfm:3)
It only seems to happen with ElastiCache, if I use a local docker container, with the same Redis version, I dont get the error and the cacheClear removes the correct query from the cache.
Happy to do more testing if someone can tell me why its throwing a NullPointerException in the QueryTagFilter.Dean
12/16/2022, 5:35 AMkey = (String)it.next(); , removing an item from the cache, then stepping it to while(filter != null && !filter.accept(entry)); where it throws.
ElastiCache isnt the problem, its doing lots of cache invalidations from a fleet of servers constantly, so it's just a timing thing where one server is trying to invalidate a set of cache items and another server removes an item it is about to loop through.
If I can figure out how to build the Redis extension I'll try push through a PRDean
12/16/2022, 6:46 AMzackster
12/16/2022, 8:31 AMzackster
12/16/2022, 8:32 AMDean
12/16/2022, 8:37 AMzackster
12/16/2022, 8:37 AMzackster
12/16/2022, 8:38 AMzackster
12/16/2022, 8:38 AMDean
12/16/2022, 8:39 AMDean
12/16/2022, 8:40 AMzackster
12/16/2022, 8:42 AMzackster
12/16/2022, 8:43 AMzackster
12/16/2022, 1:25 PM