即使关闭API服务器,RestSharp也会给予缓存的API响应
我有一个从WPF C#应用程序调用的工作nodejs api。
它已经运行了12个月,没有问题,使用了我的C#结束。
我的服务器今天下降(怪异的尖峰),从那时起,我的电话中约有50%的电话从崩溃前的缓存数据响应。
- Nodejs日志显示了电话。
- 在日志上显示了一些呼叫,并且给出了正确的响应,
- 一些呼叫在C#中说有一个响应,但在nodejs中没有呼叫的日志。响应是旧的,
- 我更改了一个不工作的呼叫来发布(从get),运行呼叫,得到例外,然后更改为get,现在它再次工作并出现在nodejs log中。
- 我的NGNIX高速缓存在服务器上
也未尝试:
- 完全关闭API并运行呼叫。即使API离线,他们仍会收到响应。
- 从我发生服务器崩溃之前,恢复项目的备份,旧文件正在做完全相同的事情/
- 尝试添加Pragma和NoCache标头,这没有解决任何问题。
我检查的内容:
- 我当前的应用程序仍然可以正常运行,所有调用正常工作,这只是我的Vis Studio Project无法正常工作(例如,我无法更新我的应用程序,否则它将破坏所有终端)。
有人知道:
- RestSharp是否有某种内部缓存,即使在此之后,API也会收到这些假响应?
- 还是Vis Studio有某种可以做到的缓存?
I have a working NodeJS API being called from a WPF C# app.
It has been running for 12 months with no issues, using RestSharp from my C# end.
My server went down today (weird spike) and since then about 50% of my calls are responding with cached data from before the crash.
- NODEJS log shows me the calls.
- Some calls show up on the log and the correct response is given
- some calls SAY in C# there is a response but there is NO log of the call occuring in NodeJS. The response is OLD
- I have changed a NON working call to POST (from GET), ran the call, got exception THEN changed back to GET and now it is working again and appearing in nodejs log.
- My ngnix cache is off on the server
Also tried:
- Turning OFF the api completely and running the calls. They are STILL GETTING RESPONSES even though the API is offline.
- Restoring a backup of the project from before I had the server crash, the old file is doing exactly the same thing/
- Tried adding pragma and no-cache headers, this didnt fix anything.
Things I checked:
- My current app is still running fine with all calls working correctly, it is just my vis studio project that is not working (eg. I can't update my app or it will break all terminals).
Does anyone know:
- Does RESTSHARP have some kind of internal CACHE that it would be getting these fake responses from even then the api is shut down??
- Or does Vis Studio have some kind of cache that would do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论