說我有兩根資源:休息 - 關係和ETag
/organizations
/persons
一個GET
通話/persons/id
回報所有關於某個人的信息。
A GET
致電/persons/id/organizations
返回一個人屬於的所有組織的數組。
A GET
致電/persons/id/organizations/id
返回該人所屬的特定組織的所有信息。它將返回與/organizations/id
中相同的內容。
有擴大其組織信息的人的信息,兩個GET
合併成一個單一GET
一種可能性:
/persons/id/?expand=organizations
我的問題是關於在後者請求的ETag。
訪問/persons/id
時,ETag被添加到響應頭中。同樣,在訪問/persons/id/organizations/id
時,ETag會添加到響應頭中。
現在的問題是:在訪問/persons/id?expand=organizations
時應該將哪個ETag添加到響應標題中?
換句話說,每次更新相關組織時,我應該更新一個人的ETag嗎?