[TYPO3-core] RFC: #6395 External TypoScripts files will always be cached

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Apr 23 16:50:15 CEST 2009


Hi Bernhard,

cool new feature, we will have a lot of use for this one, thanks!

Tested and reviewed, looks and works nice! +1

Cheers,
Ernesto

Bernhard Kraft wrote: on 21.04.2009 22:08:
> Hello everyone!
> 
> Long time no patch from me ... so here we go:
> 
> "This is a SVN patch request"
> 
> Type: Bugfix (some may call it feature)
> 
> Bugtracker reference: #6395
> http://bugs.typo3.org/view.php?id=6395
> 
> Branches: trunk
> 
> Problem:
> When including external TypoScript files via "INCLUDE_TYPOSCRIPT" syntax:
> 
> <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/typoscript/setup.ts">
> 
> Then pages using this TS will not get re-generated (TS will not get
> parsed again) even if shift-reload is pressed (while logged into the BE)
> This is caused, by not taking any information about the included file
> (time of last modification or content) into account when generating a
> hash which determines if TS should get parsed again.
> 
> 
> Solution:
> Variant #1: (diff file posted already on 14.11.2008 into bugtracker)
> Simply create a md5 of all file-contents. So if files change this md5
> value will become different --> TS gets reparsed
> 
> Variant #2: (from today), see bugtracker entry or attached file.
> Modify t3lib/class.t3lib_tsparser.php->checkIncludeLines to return not
> only the TypoScript with all files included, but also the filenames of
> all included files (put together in an array).
> Finally all "mtimes" of files will get put into the $this->rowSum array.
> This variant was proposed by Michael in the bugtracker, and I also favor
> it, as it is faster by not doing any md5 operations.
> 
> Drawback: When the newly introduced third parameter "$returnFiles" of
> t3lib_TSparser->checkIncludeLines gets used (set to true) the return
> type of this method changes from a simple string to an array.
> 
> I have no idea how I could solve this in a different way. Any proposals
> welcome. AFAIK Masi always rants if a method returns two different data
> types  ;)
> 
> 
> 
> greets,
> Bernhard


More information about the TYPO3-team-core mailing list