amp-fresh #4191

Open
erwinmombay opened this Issue Jul 25, 2016 · 6 comments

Projects

None yet

5 participants

@erwinmombay
Member

The cache operates on a stale-while-revalidate model. This means that a document when viewed by a user on the client could be stale as revalidation only happens in the background and effects subsequent page views. While this is acceptable for most content, some sections of a page are critical or sensitive enough that it warrants always having the latest piece of information such as item pricing and rating. A good example of this scenario is in e-commerce and long tail product pages which might not be visited often but should have the correct price or quantity remaining when viewed.


Will post design doc shortly.

@ericlindley-g ericlindley-g added this to the Current milestone Jul 28, 2016
@ericlindley-g
Collaborator

@erwinmombay — Calling this "Current", but please update if that's not quite right. Thanks!

@jpettitt

Is this essentially a one time amp-live-list?

@erwinmombay
Member
erwinmombay commented Sep 22, 2016 edited

@jpettitt the mechanism is, but as far as usage this component is really for an edge case for long tail pages wherein a 1 behind copy from the cache would be bad (like a 1 year old e-commerce page being the user's first landing experience and has super stale quantity count). Will add more documentation soon

@Gregable
Member

Why not just use standard HTTP expiry headers for communicating this information to the AMP Cache, rather than an HTML tag?

@jpettitt

Hmm, I knew the cache only took max-age as a hint. However you're saying it doesn't support stale-while-revalidate ? Is there some max ttl or could things theoretically persist forever?

Which error conditions cause the cache to invalidate? If it gets a 404 or 410 I know it drops the doc. What about 5xx codes?

@jridgewell
Member

Why not just use standard HTTP expiry headers for communicating this information to the AMP Cache, rather than an HTML tag?

Our stale-while-revalidate would cause bad data to be shown while we refetch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment