<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Its best practice usually to catch objects in a way that is not SQL query statement dependent. Since if you used the query statement as key, you could end up caching duplicate data since SQL statements can change often depending on data grabbed.<div><br class="webkit-block-placeholder"></div><div>I haven't used Smarty in awhile, but I believe its possible to save a smarty template object as a string which you can cache. And if not, you can always use the:</div><div><br class="webkit-block-placeholder"></div><div>ob_* (ob_start) functions. Not my cup of tea for doing that though :) Has to be a better way.</div><div><br class="webkit-block-placeholder"></div><div><div contenteditable="false"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"><div><br class="khtml-block-placeholder"></div><div>Chris Goffinet</div><div><a href="mailto:goffinet@yahoo-inc.com">goffinet@yahoo-inc.com</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span> </div><br><div><div>On Sep 3, 2007, at 11:18 PM, K J wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">It's also probably not very desirable.&nbsp; I'm guessing that you're doing something with that result set -- transforming it into some object or representation suitable for display.&nbsp; That's the thing you want to cache. </blockquote></div> <div>&nbsp;</div> <div>Are you saying that it's better to cache the output, as opposed to SQL queries?</div> <div>&nbsp;</div> <div>For those of you familiar with PHP, what if the output is being handled by Smarty? This means I can't really handle the output directly.</div></blockquote></div><br></div></body></html>