greengiant83
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2012
09:15 AM
Does roUrlTransfer cache response?
I am using roUrlTransfer::AsyncPostFromString() to get some JSON from a remote server and there appears to be some caching going on. Does roUrlTransfer automatically cache the response? If so how long does it cache for and can it be controlled?
2 REPLIES 2

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2012
10:34 AM
Re: Does roUrlTransfer cache response?
No, it does not cache transfers. Perhaps the server you are working with caches requests, or something else is going on with your code.
- Joel
- Joel
sonnykr
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2015
11:59 AM
Re: Does roUrlTransfer cache response?
I am having the same issue. The response I get from brightscript code is different (expired) from what I get from a curl/chrome client. I added a cache buster (a random value) at the end of the url, and it worked just fine.
http://www.example.com/programs/channel1?date=2015-10-21
retuned expired data and fixed by adding a random value
http://www.example.com/programs/channel1?date=2015-10-21&random=<some_random_value>
This works fine for query params method, but I have REST apis that does not allow that extra value. Is there a way to overcome this? I added Cache-Control : cache-none header, doesnt seem to be working either.
Any help appreciated. Thanks!
http://www.example.com/programs/channel1?date=2015-10-21
retuned expired data and fixed by adding a random value
http://www.example.com/programs/channel1?date=2015-10-21&random=<some_random_value>
This works fine for query params method, but I have REST apis that does not allow that extra value. Is there a way to overcome this? I added Cache-Control : cache-none header, doesnt seem to be working either.
Any help appreciated. Thanks!