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

Bernhard Kraft kraftb at kraftb.at
Tue Apr 21 22:08:01 CEST 2009


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
-- 
Freiheit ist immer Freiheit des Andersdenkenden.
Rosa Luxemburg, 1871-1919
--------------------------------------------------
www.think-open.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3246 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090421/7d1bc7e9/attachment.bin 


More information about the TYPO3-team-core mailing list