in Lucee the "cacheAfter" from the tag "query" is readonly as long no attribute "cachedWithin" is defined.
Means if "cachedAfter" is set but not "cachedWithin", the tag only gets queries from cache but does not store new queries to the cache.
Only in case a the attribute "cachedWithin" is set a query is also cached with the time restriction from "cachedwithin".
Lucee comes with this limitation to avoid eternal elements in the cache.
It should be possible to set a default value for this case in the application.cfc/cfapplication and the admin.