1 Reply Latest reply on Jun 16, 2005 1:38 AM by belaban

    some questions on cacheloader

    gagangoel

      (A)
      I was looking at the call put() of treecache when we are using cacheloader.

      These are the events I found in sequence that occured on calling put() of treecache when the node was not found in the cache.

      1) call to put() of cacheloader was made
      2) call to exists() of cacheloader
      3) call to get() of cacheloader


      Calls (2) and (3) will create extra load on the persistent store (database in our case). Is there some inherent reason for these calls..

      ----------------------
      (B)
      When are locks acquired on the nodes in tree. Before call (1) or after call(1).
      A pointer to particular section of the code where all this is handled would be highly appreciated.

      --------------------------
      (C)
      Also I was wondering if the following situation can ever happen...
      Suppose we have two servers s1,s2 .. Now s1 makes a get() call for a node which is not present in s1 cache.. s1 gets the data from persistent store..BUT before the data is actually written in s1 cache, s2 makes an update. Since s2 fails to find relevant data in s1 cache.. updates are not made to s1 cache..
      So now s2 has most recent data and s1 has older data.. which is inconsistent..



      Thanks in advance for answers to these stupid questions :)
      -Gagan