Cached stale information in DeferredNamedListImpl

2013-04-13
2013-04-21
  • Emiliano Capoccia

    I'm currently using the olap4j to Sql Server with success in one of my project.
    However, I've hit the following issue: everything works fine as long as my cube is queried. But my business logic requires the cube to be changed / reaggregated from time to time, and whenever I do so, then i can't see the new members of the cube, since the DeferredNamedListImpl basically caches these information.
    I've seen that there is a reset() method which is package-visible, however my question is: is there a recommended way to invalidate all the cached (stale) metadata and force olap4j to retrieve fresh data from the cube? I can't find such an API in the code. Any advice welcome.

     
    • pstoellberger

      pstoellberger - 2013-04-13

      as far as i remember you have to recreate the connection to flush the cached objects

      Am 13.04.2013 um 09:05 schrieb "Emiliano Capoccia" ecapoccia@users.sf.net:

      I'm currently using the olap4j to Sql Server with success in one of my project.
      However, I've hit the following issue: everything works fine as long as my cube is queried. But my business logic requires the cube to be changed / reaggregated from time to time, and whenever I do so, then i can't see the new members of the cube, since the DeferredNamedListImpl basically caches these information.
      I've seen that there is a reset() method which is package-visible, however my question is: is there a recommended way to invalidate all the cached (stale) metadata and force olap4j to retrieve fresh data from the cube? I can't find such an API in the code. Any advice welcome.

      Cached stale information in DeferredNamedListImpl

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/olap4j/discussion/577988/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
      • Julian Hyde

        Julian Hyde - 2013-04-14

        On Apr 13, 2013, at 4:41 AM, pstoellberger pstoellberger@users.sf.net wrote:

        as far as i remember you have to recreate the connection to flush the cached objects

        That's my understanding too. We wouldn't want to expose the reset method -- too much opportunity to break things. I'd be open to adding other ways of controlling the cache (e.g. sharing cache between connections) but really, the simpler the better.

         
  • Emiliano Capoccia

    Thanks for your answers, the point is: in an application server the connection isn't in my hands but rather pooled by the AS itself, and therefore I cannot recreate it. I've however modified the API and exposed an invalidateCache() method which is working fine and not breaking any test, thanks again for your attention.
    Emiliano

     

Log in to post a comment.