Refactor code to only call cache.aspx once per chart update