[TYPO3-mvc] caching issue with proposed solution
Nathan Lenz
typo3 at k9tfk.com
Fri Jan 22 16:34:52 CET 2010
Sebastian Kurfürst wrote:
> Hi Nathan,
>> It is as easy as adding a way to insert whatever typoscript we want into
>> that condition. This typoscript can change other extensions over to
>> USER_INT.
> I don't like this that much, as you'll then start writing TypoScript
> inside your PHP files (where you register the extension).
>
> However, if I am not mistaken, one can have custom PHP functions as
> conditions in TypoScript, right? Then I'd suggest to create such a
> custom TypoScript function (and make this part of Extbase, too), so one
> can call this from custom typoscript if one needs this decision.
>
> Do you like this? :-)
>
> Greets,
> Sebastian
This could be interesting... not sure where it should live, maybe
somewhere in Tx_Extbase_Configuration_FrontendConfigurationManager.
[userFunc someobject->notCacheable($controller,$action)]
do.something = USER_INT
[global]
Returns whether the currently requested controller/action should be
USER_INT or USER.
someobject->getTyposcriptCondition()
Returns a copy of the typoscript condition used by the plugin manager to
add the plugin. This could encapsulate the logic that's currently
handled in Tx_Extbase_Utility_Extension::configurePlugin(). In other
words, the configurePlugin method could call the same method to build
the logic.
Finally, another idea... just throwing this one out there: What if the
default cacheable status and exposure to Typo3 be handled with
annotations. So instead of the stuff in configurePlugin() in
ext_localconf.php, it could be auto generated by looking in the docblock
/**
* My action
*
* @param string $somestring
* @expose noCache
*/
So configurePlugin could look through all the controllers and actions
and automatically determine the default settings. I'm not attached to
that example, it's just one way.
@expose frontend noCache
@expose backend
@frontend noCache
There are countless ways to go about it. Maybe all public functions
should automatically get exposed and then all you'd need is an
@cacheable or @notCacheable.
--Nathan
More information about the TYPO3-project-typo3v4mvc
mailing list