New issue
Advanced search Search tips

Issue 736021 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner:
Closed: Aug 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Consider persistent caching for DAL associations

Project Member Reported by sbirch@chromium.org, Jun 22 2017

Issue description

Mentioned at LR this morning -- can we / do we cache DAL associations persistently? Or just an in-memory cache? Might be an opportunity to reduce verification latency.

(I wonder what we would use for the cache expiry though? Maybe this conveniently works off the cache policy of the JSON already?)
 

Comment 1 by yus...@chromium.org, Jun 22 2017

Right now we cache use_as_origin per Chrome lifecycle (a static list that is owned by a singleton).

We dont do any general DAL caching, so it depends on the DAL servers response.

I dont think these are things that would change everyday though. So it does make sense to cache them for longer durations imo and would definitely make things easier. The problem is defining the duration and justification.

Comment 2 by klo...@chromium.org, Jun 23 2017

Does DAL response have cache header?

Comment 3 by lizeb@chromium.org, Jun 23 2017

Following the sample code at https://developers.google.com/digital-asset-links/v1/samples, here is the response for the example URL:

$ curl -vvv https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=http%3A%2F%2Fexample.digitalassetlinks.org&relation=delegate_permission%2Fcommon.handle_all_urls                                                                                          
[...]
> GET /v1/statements:list?source.web.site=http%3A%2F%2Fexample.digitalassetlinks.org HTTP/1.1
[...]
< HTTP/1.1 200 OK
[...]
< Content-Type: application/json; charset=UTF-8
< Vary: X-Origin
< Vary: Referer
< Date: Fri, 23 Jun 2017 08:58:16 GMT
< Cache-Control: private
< Accept-Ranges: none
< Vary: Origin,Accept-Encoding
< Transfer-Encoding: chunked

So, according to Chrome's caching behavior, the response is never fresh in the cache, but is cacheable, which doesn't help here as there are no validators.
Mergedinto: 814755
Status: Duplicate (was: Assigned)

Sign in to add a comment