Jump to content

How much data can I store in a session?


frankvw

Recommended Posts

I've searched for any good info on this one but I can't seem to find it. So here goes.

 

Is there a limit to the amount of data that can be stored in a session before nasty side effects (such as a drop in performance or excessive resource usage on the server) will occur?

 

I'm working on a DHTML menu that's being rebuilt from MySQL table data on each page reload. Lots of loops and iterations, which slows down the page load, creates a nontrivial CPU load on the server, and is inelegant in general. I'm considering rebuilding the menu once and then caching it for, say, 5 minutes. I'm considering storing the entire menu code in the session, which currently comes to 32k of menu code but may (and probably will) be twice that much, or more, in the future.

 

So... is it stupid to dump 32-64k of HTML code into $_SESSION, or can I get away with it? What are the consequences?

 

Thanks!!

 

sayBiBi ("Frank\n");      // Sign off

 

Link to comment
https://forums.phpfreaks.com/topic/44483-how-much-data-can-i-store-in-a-session/
Share on other sites

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.