我有這種相同的緩存問題,並且無法使用上述解決方案修復它。我正在使用Symfony 1.4,JQuery和JEditable。Symfony JEditable使用url_for()檢索緩存的結果
請看看這個代碼:
$('#example tbody td').click(function() {
/* Get the position of the current data from the node */
var aPos = oTable.fnGetPosition(this);
/* Get the data array for this row */
var aData = oTable.fnGetData(aPos[0]);
var d = new Date();
var data_id = aData[0]*d.getMilliseconds();
//oCache.lastJson.aData[aPos[0][aPos[1]] = sValue;
//oTable.fnUpdate(sValue, aPos[0], aPos[1]);
//alert("aData:"+data_id);
$('td.cSelect').editable(
'<?php echo url_for('mymodule/get_data?rid=') ?>'+data_id,
{
data : '<?php print json_encode($array); ?>',
id : data_id,
type : 'select',
submit : 'OK'
}
);
/* Update the data array and return the value */
aData[ aPos[1] ] = 'clicked';
this.innerHTML = 'Select';
});
請幫幫我!
是什麼問題? –
問題是: <?PHP的回聲url_for( 'MyModule的/ GET_DATA RID =?')?>'+ data_id data_id被從高速緩存中發送的所有的時候,它應該發送不同的值每次點擊事件被稱爲 – Edge
我找到了解決方案,它不是JQuery或Jeditable,但是在Symfony上,卻愚蠢地使用硬編碼的值。 – Edge