Copy link to clipboard
Copied
I just move my server from Windows 2003 to Windows 2008 64 Bit running IIS7. I am runninf Coldfusion9. On the new server, all the chart are disappearing from the cache (\ColdFusion9\charting\cache) after a few seconds. This makes them un-printable for IE users. In the administrator/Charting I have the following settings:
Cache type: Disk Cache
51
Maximum number of charting threads:4
:E:\QIS\ColdFusion9\charting\cache
These are the same as my previous Win2003 32 server.
The old server, did not ever delete any thing from the cache directory.
How do I get the files to stay in the Cache directory for a reasonable amount of time (5 minutes). The number images in the directory while never gets above 4.
Copy link to clipboard
Copied
I'm not sure how to extend the cache - or if it's possible, but you can always use the 'name' attribute of the cfchart tag along with the image manipulation tags/functions in CF to write your own image to disk (temp file, whatever...).
Here's a quick example:
http://pastebin.com/vTrEkhjY
Copy link to clipboard
Copied
To build on my last example, if you're using a modern browser that supports it you can even do this:
<cfoutput>
<img src="data:image/jpg;base64,#toBase64(chartImg)#" />
</cfoutput>
Copy link to clipboard
Copied
Actually, you don't even need to use imageNew() if using base64()... this would work:
<cfchart xaxistitle="Department" yaxistitle="Salary Average" format="jpg" name="myChart">
<cfchartseries type="bar" query="DataTable" itemcolumn="Dept_Name" valuecolumn="avgSal"><cfchartdata item="Facilities" value="35000"></cfchartseries>
</cfchart>
<cfoutput>
<img src="data:image/jpg;base64,#toBase64(myChart)#" />
</cfoutput>
Copy link to clipboard
Copied
Thank you for the help. Unfortunately, this does not solve my problem for two reasons.
1) I would have to change every script on my site that produces a chart.
2) using this method, the image map that is created when the url Attribute no longer creates an image map.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more