我有这种相同的缓存问题,并且无法使用上述解决方案修复它。我正在使用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