[TYPO3-dev] scheduler_task should clear cache for one page [solved]

Bernd Wilke t3ng at pi-phi.tk
Mon Aug 29 08:38:23 CEST 2011


On 08/28/2011 12:26 PM, Helmut Hummel wrote:
> Hi,
>
> On 26.08.11 13:08, Bernd Wilke wrote:
>> On 08/26/2011 12:30 PM, Loek Hilgersom wrote:
>> my working solution:
>> $TCE = t3lib_div::makeInstance('t3lib_TCEmain');
>> // this seems to initalized a BE-User
>> $TCE->start(Array(),Array());
>> // so this line does not throw an error any more
>> $TCE->clear_cache('tt_news',$oneRecordId);
>>
>> with this I simulated one record-change
>> and in combination with the Page-TSconfig:
>> TCEMAIN.clearCacheCmd = 40
>
> Looks strange...
>
> If you call start() it should also work with
>
> $TCE->clear_cache('pages',$viewPage);

from documentation: this will clear cache for this page and also for 
each page with the same parent-page.
As I just want to clear cache for only one page I used the 
tt_news-change-'simulation' (so it is no simulation, as I actually 
really changed tt_news records. just more than only one)

> if the cli user has the permission to clear the cache for pages, or you
> also add:
>
> $TCE->admin = 1;
>
> before calling ->clear_cache()

normaly a _cli_...-user got no special permission, especially no 
admin-rights.
making the user admin by setting this flag manually seems a strange 
anhancement of rights (as stated in one place I found by searching for 
examples to clear cache)

bernd
-- 
http://www.pi-phi.de/cheatsheet.html




More information about the TYPO3-dev mailing list