Title:
Bug 84145:(Watson Migration Closure)Make the "dependsOn" attribute of <cfcache> more flexible
| View in TrackerStatus/Resolution/Reason: Closed/Deferred/
Reporter/Name(from Bugbase): Sebastian Zartner / Sebastian Zartner (Sebastian Zartner)
Created: 09/13/2010
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
Make the "dependsOn" attribute of <cfcache> more flexible.The attribute "dependsOn" currently takes a list of variables, which lets the cache refresh in case one variable changed. Though this is often not the expected behavior. Sometimes you just want to update the cache, if a variable has a certain value.To do so "dependsOn" should also be able to take a structure of variables. See the steps to reproduce for an example how this could be implemented.
Method:
<cfparam name="URL.refresh" type="boolean" default="false">
<cfquery name="persons">
SELECT firstName,lastName,dateOfBirth FROM persons
</cfquery>
<!---
Cache is always refreshed when URL.refresh is changing, but should just be refresh, if it is "true" Therefore you should be able to specify a structure for "dependsOn" like {refresh=true}. Maybe this logic could be enhanced to allow several values for one variable, but I believe most cases would already be covered with a simple structure.
--->
<cfcache name="test" dependsOn="refresh">
<cfoutput>
<table>
<tr>
<th>First name</th>
<th>Last name</th>
<th>Date of birth</th>
</tr>
<cfloop query="persons">
<tr>
<td>#HTMLEditFormat(persons.sFirstName)#</td> <td>#HTMLEditFormat(persons.sLastName)#</td> <td>#dateFormat(persons.dBirthDate,"medium")#</td>
</tr>
</cfloop>
</table>
</cfoutput>
</cfcache>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3042151
External Customer Info:
External Company:
External Customer Name: Sebastian Zartner
External Customer Email: 4E7365D64550DB12992015D5
External Test Config: 09/13/2010
Attachments:
Comments: