[TYPO3-mvc] Storing an object from a repository into session and get it back

Viktor Livakivskyi invisible.kinder at gmail.com
Thu Jun 18 18:15:20 CEST 2015


Hi, Jan

> i retrieve objects from a repository and store some of them into an 
> array inside the feuser session (like a basket).

This may be a not good idea, becasue storing is session means serialization of an object, which will fetch all it's properties (even the @lazy ones) recursively. Besides possible performance issue, caused by that, it may lead to a really huge data, that should be stored in a sesion. The session size limit is withing memeory_limit range and there is a probability, that you can overrun this limit. 
We have had this once in one of our projects. So, switched to storing of list of UIDs in session and retrieven objects by stored UIDs by ourselves.
 


More information about the TYPO3-project-typo3v4mvc mailing list