Provide example for placement last-modified header of now
In the comments to I8f0c3006d1bb97d228f73256c58a79235cd12670, a request for clarification was made on when the last-modified header should be "now". This adds an example to help things a bit more clear. Change-Id: I301f17bc7aad9f0037d2b13aa6e493ac9a6abb80
This commit is contained in:
parent
2506afda54
commit
13e3aff7f1
@ -226,7 +226,13 @@ last-modified when traversing a collection of entities.
|
||||
If there is no directly associated object (for example, the output is the
|
||||
composite of several objects) then the ``Last-Modified`` time should be
|
||||
``timeutils.utcnow(with_timezone=True)`` (the timezone must be set in order
|
||||
to be a valid HTTP timestamp).
|
||||
to be a valid HTTP timestamp). For example, the response__ to
|
||||
``GET /allocation_candidates`` should have a last-modified header of now
|
||||
because it is composed from queries against many different database entities,
|
||||
presents a mixture of result types (allocation requests and provider
|
||||
summaries), and has a view of the system that is only meaningful *now*.
|
||||
|
||||
__ https://developer.openstack.org/api-ref/placement/#list-allocation-candidates
|
||||
|
||||
If a ``Last-Modified`` header is set, then a ``Cache-Control`` header with a
|
||||
value of ``no-cache`` must be set as well. This is to avoid user-agents
|
||||
|
Loading…
x
Reference in New Issue
Block a user