Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Hello, while using DataSource.transformResponse() as suggested, I've noticed that when arrives a 'relatedUpdate' on that dataSource, the transformResponse method is not triggered. No operation ids involved, only default fetches.
    Is it expected?

    Comment


      #17
      Hi Isomorphic,

      Originally posted by Isomorphic View Post
      You can find the documentation regarding cache synchronization under the "Updates and Automatic Cache Synchronization" section of the ResultSet class overview, where we have elaborated further about operationId based on this post's discussion. You'll find it updated in tomorrow's nightly build.
      were the docs really updated? Searching for cacheSync does not give hits in the upper part of the docs.

      Best regards
      Blama

      Comment


        #18
        claudiobosticco: transformResponse is not triggered for the relatedUpdates, as they are themselves only partial DSResponses, and code designed to handle normal DSResponses could easily fail to handle them.

        Comment


          #19
          Originally posted by Blama View Post
          Hi Isomorphic,

          were the docs really updated? Searching for cacheSync does not give hits in the upper part of the docs.

          Best regards
          Blama
          The issue with the stale SGWT javadocs for ResultSet has been resolved. The improved content should make it onto the website by tomorrow.

          Comment


            #20
            Originally posted by Isomorphic View Post
            claudiobosticco: transformResponse is not triggered for the relatedUpdates, as they are themselves only partial DSResponses, and code designed to handle normal DSResponses could easily fail to handle them.
            Thanks for the clarification, I've moved the transformation in a DMI method.

            Comment


              #21
              Hi Isomorphic,

              thanks for adding the block
              Regarding operationIds and how they affect caching, take into account that cache sync is based on the fetch used - any add or update operation uses a fetch to retrieve updated data, and the operationId of that fetch can be set via cacheSyncOperation. If the operationId of the cache is different from the operationId of the cache update data, it won't be used to update the cache, since the fields included and other aspects of the data are allowed to be different across different operationIds. This allows to maintain distinct caches on a per component basis, so when two components are using separate operationIds they are assumed to have distinct caches, because updates performed with one operationId will not affect the cache obtained via another operationId. Also, take into account that operationId must be unique per DataSource, across all operationTypes for that DataSource.
              Very helpful. Perhaps the Quick Start Guide can link/refer to this as well.

              Best regards
              Blama

              Comment

              Working...
              X