Should I store PHP5 objects in a session for SPEED and why?

As you know, when you automatically save a class override in SESSION, and do not serialize on the following pages.

I just started writing classes, and I wonder what: is keeping a class in a session or a serialization file a good idea?

If so, how can I STORE and then GET use the class in PHP5 ?

+3
source share
3 answers

Saving object instances in a session has the following disadvantages:

  • . - , .
  • . , .
  • . . .
  • . . , , , , .

. Zend Cache .

( , , gd-), Serializable. , .

+1

, . , , , , .

+2

, , (. ). , , , .

: , - , . ( ), / , , - , , , : , .

/, , . Memcached.

+2
source

Source: https://habr.com/ru/post/1776885/


All Articles