queryExecute with cachedWithin and cacheRegion does not cache in the cache region

Description

If you have an external cache provider or region declared and want to store the a query via queryExecute, the query executes, and it caches, but on LOCAL ram and not on the provided cache region.

 

As you can see, I use the cacheRegion to tell it to store it in that cache. However, it always ignores it. Unless you change it globally in Application.cfc

If I do that, then the queries will be stored using cachedWithin in that specific cache region. Ohh and for extra credit, the cacheId is ignored and never translated it or used in the declared cache key in the cache once it caches.

Environment

Using any external cache provider

Activity

Show:

Pothys - MitrahSoft 8 August 2022 at 14:28

I've checked this ticket with the lucee latest version 5.3.10.48-SNAPSHOT. Yes, queryExecute() ignores the cacheName and cacheId options. seems it works fine in ACF.

using cacheId in cfquery throws an error and also using the cacheName attribute doesn't work in lucee.
Seems the cacheName attribute is not supported in ACF. But ACF supports the attribute cacheRegion.
The attributes cacheRegion and cacheId work fine in ACF.

The cacheName( while implementing cacheName it needs an alias cacheRegion to match ACF behavior) and cacheId attributes were described as an unimplemented attribute in lucee docs.

Zac Spitzer 5 August 2022 at 19:59

It's cacheName and it's currently marked deprecated, like cacheId, hmmmm

Luis Majano 5 August 2022 at 16:31

I added the test case here.

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 5 August 2022 at 16:31
Updated 8 August 2022 at 14:28