Raised This Month: $12 Target: $400
 3% 

Cached Issues?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-29-2012 , 12:27   Cached Issues?
Reply With Quote #1

While testing a plugin that calls the profile page of players and then uses TinyXml to read values, I noticed that if I kept my profile page open on my browser (Chrome in my case), the page being called wouldn't update.

Basically, I set my profile to private using the web page version of my steam profile (from my server). I tested the plugin and it returned that the profile was private. I then changed my profile back to public, tested the plugin, but the plugin kept returning the profile was private.

I was pulling out my hair as to why the thing wouldn't see that the profile was public when I could clearly see on the web page it was public and even looking at the xml version, it was public.

when I closed the browser and tried the plugin again, it worked.

just thought I'd pass on my experience
__________________
View my Plugins | Donate
TnTSCS is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-29-2012 , 14:59  
Reply With Quote #2

I think the whole browser thing was just a coincidence, like any decent HTTP library SteamTools' HTTP functions handle caching for you internally, but it's separate from anything else.

It'll respect the standard HTTP headers for cache control, you could try this again with it configured not to cache.
__________________
asherkin is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 02-29-2012 , 17:02   Re: Cached Issues?
Reply With Quote #3

I ran into similar trouble with my Updater plugin. You can send no-cache headers like this:
Code:
new HTTPRequestHandle:hRequest = Steam_CreateHTTPRequest(HTTPMethod_GET, ...); Steam_SetHTTPRequestHeaderValue(hRequest, "Pragma", "no-cache"); Steam_SetHTTPRequestHeaderValue(hRequest, "Cache-Control", "no-cache"); Steam_SendHTTPRequest(...);
__________________
GoD-Tony is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode