Reputation: 21
I have a page that when anyone load it first it will link to Battle net’s api and write something into memechache. And the second person can load the page fast. The chache will be alive for 30 mins. However the first guy who load the page takes a LOT of time. How can I do to let GAE load the page in the background and be the first person to load it.(using Python)
Upvotes: 0
Views: 50
Reputation: 1660
You can use Warmup requests in GAE by including the following in your app.yaml file:
inbound_services:
- warmup
This allows App Engine to issue GET requests to /_ah/warmup where you can implement handlers for that route to pre-cache application data. More on this can be found at: https://cloud.google.com/appengine/docs/python/config/appconfig
Upvotes: 1
Reputation: 2136
i have faced the same problem many times , the best solution is to use defer:
https://cloud.google.com/appengine/articles/deferred
Upvotes: 0