Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
greengiant83
Visitor

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?
0 Kudos
2 REPLIES 2
RokuJoel
Binge Watcher

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
0 Kudos
sonnykr
Visitor

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!
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.