[thelist] CF: Clearing a cached query?

Morgan Kelsey morgan at morgankelsey.com
Tue Oct 15 11:03:00 CDT 2002


rudy,

> > unless I'm reusing the query (which is another avoidable problem)
>
> ???
>
> morgan, have a care, i'm an old man and my heart can't take that kinda
> shock
>
> i am certain you meant something other than what it sounds like
>
> reusing a query is not a problem
>
> it is something to aspire to, not avoid
>

haha, put down your heart attack pills....what i'm saying is:
If I've already isolated the business logic for a section of an app into its
own template, putting the query into an include is just extra work. I tend
to make an "Action" and "Display" template, where action contains my queries
and variable chewing, and display performs the html output.

BUT, i still find, that if i have more than one template accessing a query,
there's probably a better way to do it that only needs to run the query
once.



> > putting a query in an include seems to add to disorganization
>
> again, you got to be shitting me
>
> i am certain you meant something other than what this flat out says
>
> heck, i throw every query into an include file on principle, even if only
> one page will ever call it
>

well, maybe, but for future readability, i like to just keep it in my action
template.
So ya, no shitting, I just wasn't clear I guess.



> > when there are perfectly viable solutions (like the one I presented).
>
> see, that's the deal, your idea to parameterize the timespan was
excellent,
> so i know you must've just misspoke yourself in those other comments
>
> i am, by the way, quite interested in a solution
>
> for certain queries on my site, up until now i've used 1 hour as the
> timespan, figuring that i could wait an hour for the change to take
> effect -- which is to say, for new data to appear on my site
>
> i would set it to 6 months if i had a good way to flush the cache
>
> there's data in my cms that i don't plan to change for that long or
longer,
> so it may as well live in cf's cache until then...
>
> ... unless i change it     ;o)
>

well, see Rays new post, there is an issue with my method if the whitespace
changes, but why would the whitespace change?
If we're talking about doing admin changes, and then opening the freshly
edited page with a ?query=flush honked on the end, the whitespace will be
the same.


nagrom





More information about the thelist mailing list