Application Variable Timeouts; Tips For Using Application Variables; Getting A List Of Application Variables - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Using Application Variables
variables, they are not useful for client-specific information. To target variables for
specific clients, use Session or Client variables.

Application variable timeouts

Application variables have a specific lifetime. If no clients access the application
within the specified timeout period, ColdFusion Server destroys its Application
variables.
The default timeout period for Application variables is two days. On the Variables
page of the ColdFusion Administrator, you can define timeout values for application
and Session variables. For more information, see Advanced ColdFusion
Administration.
You can set the timeout period for Application variables within a specific application
(thereby overriding the default setting in the ColdFusion Administrator) by using the
applicationTimeout

Tips for using Application variables

In general, Application variables are designed to hold information that you seldom
write but read often. In most cases, the values of these variables are set once, most
often when an application first starts. Then the values of these variables are
referenced many times throughout the life of the application or the course of a
session.
When using Application variables, keep in mind that these variables are shared by all
instances of an application that might be running on a server. Because of this
sharing, applications cannot assume that values saved in these variables are not
overwritten by other instances of the same application that might be running
simultaneously on the server. This is not a problem if you treat these variables as
write-once, read-many, but it can be a problem if they are written to
indiscriminately.

Getting a list of Application variables

Like the Session scope, the Application scope is registered as a ColdFusion structure.
This enables you to use the ColdFusion Structure functions to get a list of Application
and Session variables. For example, you can use
function to output a list of Application and Session variables defined for a specific
application.
attribute of the
cfapplication
tag.
with the
cfloop
StructFind
231

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 5

Table of Contents