ETAG support
Last updated
Was this helpful?
Last updated
Was this helpful?
Read more about works!
Search response contains etag information in the etag header and in meta.versionId
. You can cache result and use If-None-Match
header or _etag
parameter to get the latest data from the server or a response with 304
if nothing has been changed.
All ETag values are cached to make ETag queries efficient. If you somehow made this cache invalid, you can reset Aidbox ETag cache by DELETE /$etags-cache
or DELETE /Patient/$etags-cache
.
Aidbox ETags mechanisms is based on txid column of resource table in database! If you update resources in database, don't forget to update the txid column and reset cache. UPDATE resource SET txid = nextval('transaction_id_seq')
To build a cache for a specific resourceType ETag Aidbox runs a query to get the max
value of the txid
column. To make this operation efficient, it's recommended to build an index on the txid
column for tables where ETag will be used.
Use query: