[TYPO3-dev] Determine if ext_tables is cached

Popy popy.dev at gmail.com
Wed Sep 4 14:25:29 CEST 2013


Basicly, ext_tables.php are always included in backend, but cached in
frontend. If you want your code to know if ext_tables is included or not,
simply put some code in your ext_tables : it won't be executed if
ext_tables is not included.

And, of course you can use caching for your function. You'll have to find
which Class/Method of caching framework you'll have to use, but basicly
it's somthink like :

$cache = $framework->getFromCache($key);

 if (!$cache) {

    $cache = generate();

    $framework->storeInCache($key, $cache);

 )

where $key is the md5 of something built with your function name, the
merged file names, the mtime of the files


Cordialement,
Pierre Dudoret


2013/9/4 Philipp <philippwrann at gmx.at>

> Hi
>
> i wrote i function that merges flexforms for plugins, background is, that
> i have many plugins using the same fields (because working with same
> base-models etc). So i wrote a service, that merges flexforms (i only have
> to write the additions to the new flexform, everything else is inherited).
> Now i realized that the cached ext_tables.php does all of this live request
> by request. So i wonder if i can determine the ext_tables mode.
>
> Is there a constant or mode defined that i could request? When the cache
> is empty and the ext_tables is being generated i want the function to
> parse, else just return the cached XML file....
>
> Or how can i use the cachingframework for this purpose (i did not work
> with the caching framework so far), so it deletes my cache-files on clear
> configuration cache.
> ______________________________**_________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-dev<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev>
>



More information about the TYPO3-dev mailing list