Skip to main content
June 9, 2010
Question

"Application" level Arrays?

  • June 9, 2010
  • 1 reply
  • 420 views

Hello,

I am using CF 8.  I am trying to find out if it is possible to make an array that is kept on the server, rather than the client.  There are a couple of reasons I want to do this.

First, I don't want to use a database table to keep the data, because it will be under heavy use, and will cause database exceptions when the resources are locked.

Two, I need a centralized location for the data, so that users from a variety of locations can access and update it.

Is an "application level array" possible in CF?

Many thanks,

Gary

This topic has been closed for replies.

1 reply

ilssac
Inspiring
June 9, 2010

Assuming you have properly set up applicaiton variables in the Administrator and an <cfapplication...> tag OR Application.cfc file.

<cfset application.myStruct = structNew()> should get you started.

Or I guess since you asked for an array.

<cfset application.myArray = arrayNew(1)>