• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfqueryparam, caching and a pleasant surprise in 8, is it real?

Explorer ,
May 20, 2009 May 20, 2009

Copy link to clipboard

Copied

I wanted to make sure my assumptions are correct,

I have a cfc that runs a rather complicated query, the first time it runs it it can take almost a second, but caching obviously makes it run very fast. The query uses cfqueryparams for the 3 inputs that are variable. I would imagine the caching wouldn't really work because the inputs are changing all the time, but having put two function calls side by side, with different inputs, they BOTH run extremely fast. Can coldfusion 8 cache 2 queries with the same name (var scope in cfc) and DIFFERENT cfqueryparam inputs? If so, that is awesome

Thanks in advance!

TOPICS
Advanced techniques

Views

470

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 20, 2009 May 20, 2009

Copy link to clipboard

Copied

According to livedocs you cannot use cachedWithin or cachedAfter with

cfqueryparam so the answer is No.

I think you're hitting another cache: database system cache, operating

system cache, etc

Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 21, 2009 May 21, 2009

Copy link to clipboard

Copied

LATEST

Oddly, this and a few other blogs say the livedocs were revised to say you can

http://www.chapter31.com/2007/10/31/coldfusion-8-can-now-use-cacheaftercachewithin-when-using-cfqueryparams/

I dont see the "revision" as they say on the docs anymore. I would think my app would error out if it were true in CF8 that you couldn't combine them, furthermore it would update my data as soon as I change it, but instead it takes a few minutes (the amount of time I used in CreateTimeSpan()). Maybe the livedocs need to be clarified?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation