ColdFusion supports two type of variables both of which facilitate the use of persistent data – CLIENT and SESSION. And although both are enabled using , and both use CFID and CFToken for client identification, they are actually very different. SESSION variables are stored in memory, CLIENT variables are stored on disk (making SESSION variable access faster). SESSION variables cannot be shared across a cluster, CLIENT variables can (because of where they are stored). SESSION variable access must be locked, CLIENT access need not (again, because of where they are stored). And finally, SESSION variables can store complex data types (like arrays and structures), CLIENT variables cannot. As you can see, they each have their pros and cons – so pick wisely. (Applies to: ColdFusion 3 (or later))

Leave a Reply