[Typo3-dev] Code change template cache logic

Ries van Twisk typo3 at rvt.dds.nl
Thu Dec 8 15:38:31 CET 2005


Ries van Twisk wrote:

>joachim rinck wrote:
>
>  
>
>>Dennis Cheung wrote:
>> 
>>
>>    
>>
>>>I think there is an better way in "REPLACE" statement in mysql.
>>>
>>>   
>>>
>>>      
>>>
>>REPLACE is one very nice thing to have in mysql. +1 for that. unfortunately it is not 
>>covered by dbal functions. correct me if i'm wrong;)
>>jj
>>_______________________________________________
>> 
>>
>>    
>>
>I think that it should be done within a transaction block, not with a 
>propriaty mysql statement.
>Other RDBMS do support a transaction block so there is no reason to use 
>REPLACE.
>BEGIN
>   delete
>   insert
>COMMIT;
>
>-1 for using REPLACE.
>
>Ries
>  
>
Now I think of it,
I think we will find this problem spread all over the extentions and 
maby t3 core where deletes inserts happen.
If you think about it a little more then the 'state' on which a user 
retreives a website is not consistent
where inserts/updates/delete happen all the time on some pages.

When typo3 generates a page, then a x number of extentions are called, 
these extentions call on there turn the DB.
this happens in time, means that the data you retreive during that 
generation might not be consistent.

Normally this is not a problem on 99% of the sites, however if you run a 
auction or simular then you need to be more
carefull I would say, means the data you retreive needs to be concistend 
during page generation.
I think that the T3 framework can handle that, however a extention 
developer needs to be carefull using the
database access layer and it might be a good idea to start thinking 
about adding transaction support on dbal.

Adding transaction support is not that differcult, by looking at AdoDB 
one can generally see how it's done.

cheers,
Ries



.






More information about the TYPO3-dev mailing list