Depending on the language your website is developed in, you could
fetch the image from Google's servers, and store it locally on your
box, associating it with the request. "wget" could be used to download
the images if you can execute commands in a shell.
Some pseudo-code (sort of Ruby-ish):
def get_image(request_key)
graph = graph_associated_with(request_key)
if graph == not_found
local_graph = download_graph_from_google_to_my_machine()
associate_graph_with_request(request_key, local_graph)
graph = graph_associated_with(request_key)
end
return image_tag(graph)
end