Weather Cache Settings

By default, your weather widget stores weather data for 30 minutes to help keep your site pagespeed fast. This can be tricky however when you are setting up your site. You may change a setting like turning the weather icons on and then nothing happens if the cache for that widget has already been set.

To change the cache timeout, you can use this function in your functions.php file found in your theme folder. This example is set for 3600 seconds which is one hour.

function hg_awesome_weather_cache()
{
	return 3600; // IN SECONDS
}
add_filter('awesome_weather_cache', 'hg_awesome_weather_cache');

 

Option 1: Clear Through Button

Both versions of the plugin (free version starting at 1.5.3) have a ‘Clear All Cache’ button in ‘Settings’ -> ‘Awesome Weather’. It is located at the bottom of the page. You just need to click it.

clear-weather-widget-cache

Option 2: Clear Through URL

To clear the cache for a single widget, navigate to the page where the plugin is present. Then add to the url ‘?clear_awesome_widget’. So if your url is halgatewood.com it would look like this:

clear-weather-cache