Misc Matt | 16 Apr 2009
Manually Purge ColdFusion Client Sessions in Database
ColdFusion will purge your client sessions for you on a schedule. This schedule is dependent on when the CF engine starts. If your purge schedule is OK now, a CF reboot will set a new schedule and cause problems. if you use a database and your client variables table has hundred of thousands or millions of records, this can really kill performance.
I have disabled purge of client sessions in the CF Admin and do my purge during low load hours using a separate schedule.
I run 4 queries in a bash script. You can write a CF script to run these in windows or any other scripting language that let’s you connect to your client variable database.
Here’s the MySQL versions of the queries:
delete from CDATA where CFID in (select CFID from CGLOBAL where CGLOBAL.lvisit < date_sub(now(), interval 60 day));
delete from CGLOBAL where lvisit < date_sub(now(), interval 60 day);
optimize table CDATA;
optimize table CGLOBAL;
Optimizing your tables after the purge will clean up the empty space in your db file left now that those records are gone. This is helpful if you delete thousands of records at a time.
Web Architecture Matt | 13 Apr 2009
tfoot between thead and tbody for summary
When insuring W3C validation on a website lately, I saw that the tfoot tag must come before the tbody tag. From the W3C spec: “TFOOT must appear before TBODY within a TABLE definition so that user agents can render the foot before receiving all of the (potentially numerous) rows of data.” That makes sense but it’s benefit just clicked today. The foot should function as the summary of the table data and thus let the user agent decide if it cares about the body. Screen readers make obvious benefit of this. I can see how search enignes would appreciate useful tfoot summaries as well as mobile applications.







