What are the consequences of storing large amounts of data in a session cookie?

Can someone explain the disadvantages of storing large amounts of data in a session or tell me some readings?

I would also be wondering if there is a difference between storing data in a session and reading data from data files?

+6
source share
2 answers

If you store a large amount of data in a session, you will have I / O performance, as there will be a lot of read / write.

Sessions in PHP are, by default, stored in the / tmp directory in a flat file. Therefore, your session data is written in some form of data file.

PHP session_set_save_handler(), / .

php.ini, session.save_handler.

, , , , , - , (, ). , , . , . , - , .

, ?

, - -. , , , , , . , , - -. , (/tmp), , /tmp. , NAS , .

- . . , , , -, - . NoSQL - , NoSQL . , , RDBMS.

, , . , , - , . , . Redis Memcache , Google , , Redis Memcache .

: . - 3 .

+4

: http://tuxradar.com/practicalphp/10/1/0

- . - cookie session_id dbfile/rdbms. , .

+1

All Articles