[TYPO3-core] RFC: performance enhancement for tstemplate/cache_pagesection

Wolfgang Klinger wolfgang at stufenlos.net
Tue Aug 29 14:17:33 CEST 2006


 *hiya!*

 On Tue, 29 Aug 2006, Dmitry Dulepov wrote the following:
> Solution: change DELETE/INSERT to UPDATE/INSERT_on_update_failure. I 
> have this patch running in production for a week and had only two 
> entries about cache_pagesection (for 6 seconds both) since that time.

 +1
 
 one note:
 you don't use $res, so you can omit it here I think:

> +				$mpvar_hash = t3lib_div::md5int($GLOBALS['TSFE']->MP);
> +				$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('cache_pagesection', 'page_id=' . intval($GLOBALS['TSFE']->id) . ' AND mpvar_hash=' . $mpvar_hash, $insertFields);
> +				if ($GLOBALS['TYPO3_DB']->sql_affected_rows() == 0) {
> +					$insertFields['page_id'] = intval($GLOBALS['TSFE']->id);
> +					$insertFields['mpvar_hash'] = $mpvar_hash;
> +					$GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_pagesection', $insertFields);
> +				}


 bye
 Wolfgang




More information about the TYPO3-team-core mailing list