Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does URL Fetch use GAE's proxy cache?

I wonder know, if Google App Engine's service URL Fetch uses proxy cache, which is discussed in other thread? My question is: if I send request using URL Fetch from my app on GAE to my app (to some handler), will the result be cached in this proxy?

Thanks.

like image 583
Stanislav Heller Avatar asked Apr 14 '26 03:04

Stanislav Heller


1 Answers

Set an appropriate Cache-control header on URLFetch:

Python

result = urlfetch.fetch(url, headers = {'Cache-Control' : 'max-age=0, must-revalidate'})

GO

client := urlfetch.Client(c)
req, err := http.NewRequest("GET", check.Url, nil)
req.Header.Add("Cache-Control", `max-age=0, must-revalidate`)
resp, err := client.Do(req)
like image 146
Peter Knego Avatar answered Apr 16 '26 06:04

Peter Knego