[TYPO3-mvc] Extbase objects caching

Viktor Livakivskyi invisible.kinder at gmail.com
Fri May 23 18:05:58 CEST 2014


Hi, List.

I have a structural question, related to Extbase caching.
Let's assume common situation, when we have a repositoy with ->findAll() method, which returns all objects of type, repository manages.

Result of this method is taken into some controller and output on almost every page via extbase cacheable plugin.

By it's nature TYPO3 will cahce output of the plugin with the page's cache and next hit on same page will not invoke a plugin, but fetch result directly from cache - ok from this point.

But then we move to a different page and same plugin, same controller and same ->findAll() is called, which again queries db, invokes popertyMapper, does all dirty job and so on.

The question is: can we avoid quering of db and object creation on second (and any other) page?
Let's say, once ->findAll() is called - all the objects are written to some cache, which is invalidated either by lifetime or by BE change of db entries, or by ->add() ->update() methods of repositpry.

I know, that I can add my own cache and use Caching Framework, then add some BE hooks to flush the cache by some editor's actions, but shouldn't Extbase do that for me already?

I found some "extbase_object" cache definition, but seems, taht it only caches some class info, but not objects themselves.

Can someone lead me in a right direction, please?

I'm working with TYPO3 6.1, if that matters.


More information about the TYPO3-project-typo3v4mvc mailing list