diff --git a/CHANGELOG.md b/CHANGELOG.md index dceac0e272ecff2ea89cd2b45322e8fd985ddd24..b842574af4c4b190614c0c75e5bf061b1d47171e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -* `ETag` property for the query. The `ETag` tags a server state and is being - updated each time the server state is being updated (i.e. the stored entities - change). This can be used to debug the query cache and also allows a client +* `ETag` property for the query. The `ETag` is assigned to the query cache + each time the cache is cleared (currently whenever the server state is being + updated, i.e. the stored entities change). + This can be used to debug the query cache and also allows a client to determine whether the server's state has changed between queries. * Basic caching for queries. The caching is enabled by default and can be controlled by the usual "cache" flag. diff --git a/src/test/java/org/caosdb/server/query/QueryTest.java b/src/test/java/org/caosdb/server/query/QueryTest.java index 9ca813701ada8e5dd7f311ece5cf9f423974e79f..da652cb3e9bed9b2412dae116bb104c034a01cfe 100644 --- a/src/test/java/org/caosdb/server/query/QueryTest.java +++ b/src/test/java/org/caosdb/server/query/QueryTest.java @@ -67,7 +67,11 @@ public class QueryTest { assertEquals(Query.Role.ENTITY, q.getRole()); } - /** Assure that {@link WriteTransaction#commit()} calls {@link Query#clearCache()}. */ + /** + * Assure that {@link WriteTransaction#commit()} calls {@link Query#clearCache()}. + * + * Since currently the cache shall be cleared whenever there is a commit. + * */ @Test public void testEtagChangesAfterWrite() { String old = Query.getETag();