Hey guys
Here casting my vote for this as well!
The use-case I have is that the “Force refresh” doesn’t work with the site I’m working on as it can’t accept the parameter used and it looks setting a custom variable in the URL would get it working (I know, not as exciting as some of the other use-cases here - but it would still be great to have!)
Hey Scott-
I moved your reply to it’s own thread so we could open up some discussion on your use-case.
Can you share more details about how having Variables in Media Tiles would help with your use-case?
PS. Don’t forget to scroll up to the top of the original feature request thread and actually cast a vote. (Comments don’t count as votes)
Hey Josh!
Sure, happy to share details I’m working with a link on a media tile that is sensitive to unknown query strings and so the “force refresh” option doesn’t work in this instance.
I did however notice that there are some of the existing query strings within the link that can be modified that will both, a) allow the “cache buster” method to force the refresh and b) won’t break the site.
Here’s the link for reference:
https://api.weather.com/v2/maps/dynamic?geocode={geoCode}&h=320&w=568&lod=9&product=twcRadarHcMosaic&map=light&format=jpg&language=en-US&apiKey={apiKey}&a=0
If variables worked in the media url, I could easily circumvent this but for now, I’m planning to use the Android Automate app to periodically restart Sharptools for a similar effect (If not a little janky )
If that’s the case, I suspect there’s a better approach to handling this.
Media in Variables Use-Case
The Variables in Media Tiles feature request is more suited for cases where someone wants the image to change based on a specific variable value – like displaying a different image for specific device states… or even custom weather backgrounds that match the conditions (assuming it was extended from Media Tiles to Dashboard Background Media).
For your case, it would mean having to come up with some approach to periodically update a SharpTools Variable just so it could refresh the URL and that seems like something that could be done way more efficiently client-side.
Parameters + Custom Tile
What parameters would you plan on changing from your sample URL to get it to refresh? Is it the trailing &a=0
that can be updated?
The reason I ask is you might be able to put together a Custom Tile that could periodically update the URL for you unique case.
KB Article
I would also review the Media Force Refresh Setting KB article as it has a good explanation of things. You might be able to leave the “Force Refresh” off and perhaps the image served by Weather.com just has a longer cache period, but it would eventually refresh?
Alternative Source
I wonder if there might be a different source that provides the same type of output that would be compatible. Either something that works with a Media Tile or a website where the whole page could even be embedded as a URL Custom Tile.
There’s also some alternative weather tiles listed in the following article that may be interesting to you: