doukun5339 2015-02-09 14:25
浏览 43
已采纳

too long

I hope this is not a stupid question, or one formulated wrong. For my code's purpose, I am getting the value of a button with jquery, post it with ajax in a table and then fetching it in another part of the code. This is the simple explanation. And I appreciate the concern, but dont question why I am doing so because this is how it works and I wont change it.

Now the thing is that the data I get with the select query in the end are only those that were registered before the last page reload.

If you need to see code, this is the link to my previous question regarding this same problem: Code returns the latest value before last refresh instead of the latest value inserted?

I was wondering if the reason I get such data has something to do with caching?

  • 写回答

2条回答 默认 最新

  • dounuo1881 2015-04-21 13:02
    关注

    Even though I initially thought myself it was a race condition (nice suggestion), it was actually a client-side/ server side interaction issue. A race condition could have caused the previous result to display, but not necessarily the result before the previous page load.

    However, I found the answer of Joe Love very useful, since I hadn't heard / considered racing condition before. Also, good point in saying that postgres doesn't really "cache" data

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥15 深度学习残差模块模型
  • ¥50 怎么判断同步时序逻辑电路和异步时序逻辑电路
  • ¥15 差动电流二次谐波的含量Matlab计算
  • ¥15 Can/caned 总线错误问题,错误显示控制器要发1,结果总线检测到0
  • ¥15 C#如何调用串口数据
  • ¥15 MATLAB与单片机串口通信
  • ¥15 L76k模块的GPS的使用
  • ¥15 请帮我看一看数电项目如何设计
  • ¥23 (标签-bug|关键词-密码错误加密)