Unnecessary Processing
Caching is an easy way to eliminate data access and processing by caching previous output in memory. It's not the only way however, the cf_spContentGet tag has two attributes that can be used to limit the amount of data retrieved and limit the amount of post-query processing which has to be done before the tag returns a query to the caller.
The cf_spContentGet tag sometimes does post-query processing before returning a query to the caller. Part of that post-query processing is to run any contentGet methods found for the properties for each row returned after querying the database. The asset property type is the only property type included with Speck that has a contentGet method. So, if you have a content type with two asset properties and 50 rows are returned from the database query, cf_spContentGet will run the contentGet method for the asset property 100 times before returning a query to its caller, once for each asset property in each row.
Using the maxRows attribute
The "maxRows" attribute limits the number of rows returned by the query in cf_spContentGet and can also be used to limit the amount of post-query processing. In the example above, if you only wanted 10 of those rows (most recent 10 news items maybe), there's no point in all that extra processing, so you would set the maxRows attribute of either cf_spContent or cf_spContentGet (depending on which you were using to retrieve content) to "10". Speck also uses DBMS specific SQL syntax to limit the number of rows returned if a dbtype has been set in the application configuration file, thereby reducing the traffic between the DBMS and ColdFusion server.
Using the properties attribute
The "properties" attribute limits the properties retrieved by cf_spContentGet. In the example above of a content type with two asset properties, if you only needed one of the asset properties returned, you could specify the list of properties to be returned using the properties attribute, excluding the second asset property from the list and eliminating any unnecessary post-query processing for that property.
Note that even if you use the properties attribute to limit the properties retrieved, cf_spContentGet still returns a query containing a column for all properties, even those not specified in the properties attribute value. Columns for properties that are not included in the properties attribute will contain empty values. This is to avoid errors in content type methods when the properties attribute is used with the cf_spContent tag and the method references a property that was not included in the properties attribute.