I have a long background in ColdFusion, but recently started working on a PHP project.

In CF, when building an application, I would routinely put large amounts of data into the "application scope" - a shared area of memory available to all pages on a site - to reduce database and file i/o.

I see that using the mm option in config.php allows data for user sessions to be maintained in memory. How can I do this for application level data (i.e. data that is shared across all sessions in a site)?

Thanks,
-Rob 😕

    You can't use sessions for more than one user.

    You could use the serialize/unserialize functions to keep a serverside file of the variables every script needs to access.

      Thanks NogDog,

      That looks like the kind of thing I'm after. I guess I'm going to have to get used to not having an app server to take care of that kind of thing for me.

      Cheers,
      -Rob

        Write a Reply...