Announcement

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

    Why do "update" operations invalidate the cache?

    I have a TreeGrid that has cacheAllData set to true and noticed that the first time I reparent a node Smart Client issues a single "update" operation to the server, but on the second and following times I reparent a node it issues a "fetch" operation immediately followed by the "update" operation. That seemed inefficient and possibly a bug, so I dived into Smart Client's code to figure out the cause. Here's what I found out (looked at both Smart Client 8.2 and 8.3 -- code's the same):

    1. In the "update" callback, DataSource.handleUpdate is called
    2. Inside that method it always calls DataSource.updateCaches
    3. Inside that method, towards the bottom is this code:

    Code:
            // if we're caching all data and the cache is full, invalidate it to force a refresh
            if (this.cacheAllData && this.hasAllData()) {
                this.invalidateCache();
            }
    It appears that every time after an "update" operation is performed, the cache is invalidated and thus subsequent updates have to do a "fetch" operation first before they can issue the "update".

    Why is that? Is that by design? If so, why?

    Thanks!

    #2
    Isomorphic, any thoughts?

    Comment


      #3
      Hi
      We have a developer assigned to look at this and will let you know when we have a definite solution or answer.

      Regards
      Isomorphic Software

      Comment


        #4
        Cool, appreciate it!

        Comment


          #5
          Ok we believe this issue is now resolved. This will show up in 8.3d nightlies going forward and in the 8.3 final release.

          Comment


            #6
            Thanks much!

            Comment

            Working...
            X