Olivier Poitrey
Olivier Poitrey
Etag is an opac string. We can combine all etags of the (sub-)resources using the hash algo of our choosing to create a composite etag. Why do you want to...
Summing n string is less expensive than summing n maps with arbitrary number of fields (and subfields) stored as `interface{}`. We could checksum the JSON representation, it would be in-between...
Just looked at the code. Accessing the Etag during projection evaluation might be tricky actually. I think `query.Projection.Eval` should return a list of resources used during the evaluation for instance,...
I would go for md5. The xor route would be interesting but would require to either guarantee all Etags are same length or use padding. All rest-layer Etags are currently...
One solution would be to have a composite Etag with a separator like `-`. The full Etag would be used by browser for caching, but we could strip the second...
I’m not a fan of poluting the payload with metadata.
What’s wrong with the composite etag described above?
I have no better solution to propose so let’s do that :/
In the light of this, xor is the way to go. We can handle different sizes using padding when necessary.
I'm all for 1., moving the _tag in the payload and using a hidden/secret/whatever field type to make it not part of the default payload.