[TYPO3-mvc] Persistence object caching
Chetan Thapliyal
chetan.thapliyal at aoemedia.de
Thu May 19 16:47:40 CEST 2011
Hi all,
I just faced a weird problem with caching of persistence objects in
extbase. When an object is queried for the first time, extbase keeps a
copy of it in memory. That means when the same object is queried again
in the same PHP session extbase returns the copy kept in memory rather
than making a new one. This has some implications. If the object's data
is modified in database by some other PHP session triggered after the
first query then the changes won't reflect in existing PHP sessions.
This is exactly what happened with me.
While debugging I noted that extbase do fetch the data from database for
every query but doesn't use it if there already exists a copy of the
object in memory.
I am wondering if anyone else faced the same problem.
Extbase version: 1.3.0
--
Chetan Thapliyal
System Developer
e-Mail: chetan.thapliyal at aoemedia.de
Web: http://www.aoemedia.de/
More information about the TYPO3-project-typo3v4mvc
mailing list