Thanks a lot! I'll definitely try this.

On 9 sep, 03:40, Tammo Freese <[email protected]> wrote:
> HiSantiago,
>
> On Sep 8, 9:01 pm,SantiagoLema<[email protected]> 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

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to