WeatherNation Blog

HW3Cacher Script 1.0 released for HW3php

The development of HAMweather 4 (HW4) is going quite smoothly, and several new features have been integrated into its core code base. One such feature is the ability to cache the output of a request so that future requests within a set cache time can simply output the cached page without having to load and process the various modules and data. For high volume access this feature can save a lot of time and resources. HAMweather has been using this feature on our Tropics Center (which uses HW4 alpha code) with great success. Thus, HW3cacher was developed so that HW3 users can benefit from the increase in efficiency as well until HW4 is released.

The HW3cacher script is used as a front end to the HW3php script. When installed, the script will cache HW output on the original request. Then on future requests for the same URL the data in the cache will be used and the HW3 script will not be loaded. If the cached output has expired, then HW3 will be loaded and the output regenerated and cached once more.

During our testing a standard HW3php request for a local forecast used up to 4MB of memory and 1.3 seconds to fetch, parse and output the data. When using HW3cacher, once cached subsequent requests for the same URL used only 0.25-0.5MB of memory and only took 0.02 seconds to output to the web browser. This data shows that subsequent requests for the same URL use up to 94% less memory and are outputted up to 65 times faster than calling HW3 directly. Note that each individual user/server will experience different results based on the available server resources, network speeds and server specifications.

While the HW3cacher script is primarily designed for high volume websites that receive a high number of HW3 requests for the same data within a short amount of time, other sites can benefit from HW3cacher as well. For example, a site can benefit from HW3cacher if weather data is included on the home page via calls to HW3php or when inclement weather occurs in a location and the site receives an abnormally larger number of requests for a specific local forecast etc.

Downloads Via Plugins Area: http://support.hamweather.com/dload.php?action=file&file_id=169

Documentation:
HTML: http://www.hamweather.com/hw3/docs/hw3php/HW3Cacher_php/
PDF: http://www.hamweather.com/hw3/docs/hw3php/HW3Cacher_php/HW3Cacher_php.pdf

Support: http://support.hamweather.com

Calendar
January 2008
MonTueWedThuFriSatSun
« Nov Feb »
 123456
78910111213
14151617181920
21222324252627
28293031