[TYPO3-core] length and usage of column "ident" of table "cash_hash"

Franz Holzinger franz at fholzinger.com
Mon Jul 17 13:29:37 CEST 2006

Hello Martin,

>The problem in particular is the ident field. Some extension (eg 
>automaketemplate) use the field. That is they fill it, but the don't use 
>it. Otherwise it might have been noticed that a value of 
>"tx_automaketemplate_pi1" will be truncated to "tx_automaketemplate_".
	* Stores a string value in the cache_hash table identified by $hash.
	* Can be used from your frontend plugins if you like. You can call it directly like t3lib_pageSelect::storeHash()
	* @param	string		32 bit hash string (eg. a md5 hash of a serialized array identifying the data being stored)
	* @param	string		The data string. If you want to store an array, then just serialize it first.
	* @param	string		$ident is just a textual identification in order to inform about the content! May be 20 characters long.
	* @return	void
	* @see tslib_TStemplate::start(), getHash()
function storeHash($hash,$data,$ident)	{
	$insertFields = array(
		'hash' => $hash,
		'content' => $data,
		'ident' => $ident,
		'tstamp' => time()

>What to do now?
>We could enlarge the column (20 chars is not extremely) long. Nice but not 
>really necessary.
>Or we could do a substr on the ident value (in the identical functions 
>storeHash in t3lib_page and t3lib_befunc). This should not hurt any code 
>that reads the ident as it has always been trimmed by mysql. But we could 
>say it's up to the PHP developer to send correct data.
The string should only be touched when it is longer than 20 characters.
I think the function should return a false in this case and cut off the 
first characters.
You can offer an additional function or parameter for a generation of 
this string.



More information about the TYPO3-team-core mailing list