ColdFusion 10 cache bug

Written on 14 October 2014, 02:10pm

Tagged with: ,

After upgrading to ColdFusion 10 I noticed that the error timeToLive can't be negative is thrown for each query that was cached for more than 15 days.
This bug is already reported in the Adobe’s Bugbase: Error when using CFQUERY’s cachedWithin with value > 15 days
A quick workaround is to cache the query for less than 15 days; like that:

<cfquery name="myQuery" datasource="#dsn#" 

Starting to understand the frustration of the people commenting on the last ColdFusion 11 update:

… the current state of affairs is not good enough anymore in 2014. To be honest it already wasn’t good enough anymore in 2011 or 2012. You need to get your processes under control. … If your build and test process for CF is too cumbersome to do faster releases, it seriously needs to change or you’ll end up like the dinosaurs a few 100 million years ago — you’re trying to compete with modern web technology stacks/frameworks there and there should be an update every 4-6 weeks.

Update: a few hours after I wrote this, the status of the bug changed to ‘Fixed’ – as the CF 10 Update 14 was released.

The title says it all, but I will detail.
-you are on ColdFusion 8
-and using the CFFTP tag with action=”listdir”
-and the remote FTP folder is on a UNIX system
CFFTP will not list the files and folders having last modification date 29 February.

Why this happens?

Apparently, because of a bug in the FTP client used by ColdFusion. The FTP client is Apache Commons NET – FTPClient, and according to this article:

The Unix ftp server returns the date in the format “MMM d HH:mm”. No year info is supplied.
This caused problems, of course, since Feb 29 is not a valid day in the default year 1970.

When was this discovered?

According to this thread on Adobe Forum, it was first reported on 29 February 2008:

CFFTP from one Red Hat AS 4 server to another Red Hat AS 4 server is not retrieving files with modification dates of February 29 2008. The files simply don’t show up in the listing. They do show up in every other FTP and SFTP program I’ve tried, including command-line FTP from the system trying to CFFTP and from other systems on the network. It appears to only be affecting CFFTP TO a unix/linux system.

When was this bug fixed?

Today, 26 April 2012, the bug is still present. As one users points out:

It happened again in 2012!
On windows 2003 server with CF 8
Come on Adobe. Neglected this one for 4 years cost me 5 hours of work today.

One can argue that it is not a ColdFusion bug, it’s an Apache FTPClient bug. But when this bug is affecting the correct function of ColdFusion, then an action is necessary. Moreover, when behind ColdFusion is a company the size of Adobe, there’s really no excuse for not fixing it for more than 4 years.