[TYPO3-mvc] Cacheable and non-cacheable actions in extbase
Sören Kracker
s.kracker at kopfstand-mail.de
Mon May 7 17:04:13 CEST 2012
Hi list,
I've got an extension which makes use of ml_geoip. I've got problems
using and understanding how to setup the cache in my extension and need
hints for best practice.
initAction checks if visitor's country is already present in session. If
yes, it forwards to listAction, otherwise to geoipAction which finds out
about the visitor's country, writes it to the session and then forwards
to listAction. So listAction receives always the visitor's country and
could be cached for each country.
Reason for this is that depending on the country other records should be
selected from the database.
I've set up actions init and geoip (non-cacheable) in default plugin and
list (cacheable) in another plugin.
Is this the recommended setup? Or could/should I set this up in another
way? And which part exactly is cached then? I'd assume that changing
something in the controller action would have no effect if there is
something cached, but it does. Performance isn't that great (>2s per
page) although there are just a few records. But maybe this is because
of extbase in general? Or is it Fluid? Where could a bottleneck be? In
the controller from Init to end of List action takes only 1ms.
TYPO3 Profiler extension shows no_cache = 1 on the page with my
extension. Shouldn't this be 0? Any help/hints appreciated!
Kind Regards
Sören
More information about the TYPO3-project-typo3v4mvc
mailing list