Jump to content

[SOLVED] Global Array at Application level


Hasti

Recommended Posts

Hello Everyone

    I want to make global array at application level without using session. Once the application execution begins first time data comes from database and stored in array then next everytime data should be loaded from array instead of database.

 

    Thanks in advance

 

Regard

Hastimal Shah

If not storing in the session then where do you plan to store the data from the array after the first access from the db? It has to go somewhere.  I guess if you really wanted to you could maybe store it with a cookie but thats probably a bad idea for security reasons.

Uhmmm....  If the array is too big to fit in a session, what in the world is the data?  Do you use all of the data each page load?

 

 

By the way, HTTP is stateless, so unless you use cookies (which have an 8kB or something limit), sessions are your only option.

 

 

 

Edit:  Hrmm... Well, actually you could probably get around using sessions....  For example, you could use something like memcached.  But that would essentially be sessions.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.