Query caching must include datasource, username, and password query options in the cache key

Description

From the CFQuery docs:

To use cached data, the current query must use the same SQL
statement, data source, query name, user name, and password.

https://cfdocs.org/cfquery#cachedwithin

Our current implementation fails to take the datasource, username, or password into account. This incorrectly causes a duplicate query run against two separate datasources or database connections to use the same cache entry, when obviously the data could be entirely different on a different datasource or with different user credentials.

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created June 28, 2024 at 2:08 PM
Updated July 5, 2024 at 1:44 PM
Resolved July 5, 2024 at 1:44 PM

Flag notifications