Jump to content

variables page include once per user or every user (via ram usage)


mvc

Recommended Posts

Lets say my website has a page of global variables all listed on a single page. (lets make this file 1 MB just for round numbers, i know that would be thousands and thousands of variables). Each time a person is logged into my website this file for variables has to be included for the pages. Page is the same for every user as its just global variables on it.

 

My question:

 

If I have to included this page for every single user, and I have 500 users on the website. Will this require 500 MB of ram just to have the file loaded into the mem or will php include this page just once into the ram. SO just 1 MB of ram used for all users to have this page included into the script they are using to view that page they are on.

 

Hope I explained that well enough, I've gotten different answers from several people for this. So some background on why your answer is right would help me understand this more.

 

Thanks

Web servers are stateless. This means each request for a page is completely separate from all other requests for the same or any other page. Nothing on a page is shared between visitors.

 

So your saying it would require 500 MB of ram to have that included for 500 people if each file was 1 MB?

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.