Hi Santiago,
On Sep 8, 9:01 pm, Santiago Lema <
jacques.l...@gmail.com> wrote:
> Since this app basically serves semi-static content (it's updated once
> a day) I used AppEngine's memcache to serve every request.
[...]
> So I just added another level of caching before memcache: a simple
> python dict that stores the data in the instance itself. This
> instantly reduced the number of instances back to 1 (sometimes 2).
> This suddenly makes the new pricing acceptable.
if
1) you know how long the content won't change,
2) the content is publicly accessible, and
3) you have billing enabled,
you should also set the Cache-Control header. Then Google may put your
content in its front-end Cache, and for cache hits on that cache, you
would only be billed traffic and no CPU/instance time. As far as I
know, there are no guarantees whether/when the front-end cache kicks
in, so I would keep instance cache and Memcache.
If you are on Python:
seconds_valid = # Add whatever value is appropriate here
self.response.headers['Cache-Control'] = "public, max-age=%d" %
seconds_valid
You see the front-end cache working if your log shows "204 No Content"
log entries with 0 CPU seconds in your log.
Please let me know whether it worked for you.
Take care,
Tammo