alternatives to display 3x3 grid of merchandise
so I was looking through Ben Forta's code for their merchDisplay custom tag from the Web Application Construction Kit CF8 and was surprised so see they perform a select / where clause on every item of merchandise displayed on the page.
Effectively they do this on the page that displays merchandise
<cfquery getMerch cachedwithin 0,1,0,0>
select *
from merchanidse
</cfquery>
<cfloop query getMerch>
<cf_MerchDisplay merchID=#merchandiseID#>
</cfloop>
------------------------------------------------------------------------
the <cf_MerchDisplay> custom tag has this code in it
<cfquery name="getMerch" datasource="#APPLICATION.dataSource#" cachedWithin="#createTimeSpan(0,1,0,0)#">
SELECT *
FROM 00_merchandise
WHERE merchandise_ID = #ATTRIBUTES.merchID#
</cfquery>
<cfoutput>
#merchandise_title#
</cfoutput>
My question is, doesn't performing an individual select / where on each item of merchandise impact performance ? Or because it's cached, does it not matter ?
My alternative is to not have the custom tag and to just use the initial select query to <cfoutput>merchandise_title(1), merchandise_title(2), merchandise_title(3) etc... ?
