[TYPO3-mvc] Storing an object from a repository into session and get it back
Jan Kornblum
jan.kornblum at gmx.de
Fri Jun 19 12:58:37 CEST 2015
Hi Viktor,
>> 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.
thanks for your reply.
Assuming there are only "productId" and "quantity" given as a
"basketItem"s property, would it break DDD ideas if i would add a
getter getProduct() to the "basketItem" model and inside this getter i
fetch the "product" directly from the repository?
I just want to keep my basket dynamic ;)
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list