Evan Martin wrote:
> This cache is in-memory only, right?  That is, it's generated during startup?
> (In the past I've talked about caches but I'm worried that the NTP
> positioning will jump around due to stale caches, since the site
> ranking is based on day granularity.  Though that could be considered
> a design flaw.)

Right now, I'm hanging a new method on NewTabHTMLSource to generate
the data and store it in a member.  I'm calling that from the NTHS
constructor, and I'm doing the same thing for the CSS in
DOMUIThemeSource.  It seems that each occurrence of the New Tab Page
gets its own NewTabHTMLSource and DOMUIThemeSource objects, so the
cache should be scoped to a single instance of a New Tab Page.  I
haven't experimented with Reload or tried other things that might
abuse the cache.

> Another option is for the browser push these resources into the NTP as
> it's being constructed.  That is, textually append a <script> tag with
> the JSON blob of the NTP data at the bottom of the NTP HTML.  That's
> how our translation templating works and it skips all the
> back-and-forth of requests.

Yup, that would cover it too.  Thanks for the suggestion.

Mark

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to