Topic
  • 4 replies
  • Latest Post - ‏2013-02-19T19:53:45Z by DP_learner
DP_learner
DP_learner
47 Posts

Pinned topic Is it possible to flush only selected documents from document cache ?

‏2013-02-19T16:49:00Z |
The scenario is as follows :
There are about 20 xml files that we need to fetch from an external location and use them internally for some business logic. At regular intervals, we need to see if any of these files have got updated and if so, make use of the updated files.
I was hoping to use the document cache for caching these xmls and in case any of the xmls changes, wanted to see if there was a way to refresh only that xml in my cache rather than having to flush the entire cache and load all the xmls again. In the latter case (loading all xmls again), the time taken for these xmls to be loaded in cache would be longer and my online requests would not be served appropriately during that time.
Please advise.
Updated on 2013-02-19T19:53:45Z at 2013-02-19T19:53:45Z by DP_learner
  • HermannSW
    HermannSW
    4741 Posts

    Re: Is it possible to flush only selected documents from document cache ?

    ‏2013-02-19T18:11:09Z  
    Please use CLI clear command in document cache mode -- the pattern allows to do complex selections!
    http://pic.dhe.ibm.com/infocenter/wsdatap/v5r0m0/index.jsp?topic=%2Fcom.ibm.dp.xi.doc%2Fcommandreference.xi50453.htm&path%3D4_4_0_18_0

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • DP_learner
    DP_learner
    47 Posts

    Re: Is it possible to flush only selected documents from document cache ?

    ‏2013-02-19T18:42:36Z  
    • HermannSW
    • ‏2013-02-19T18:11:09Z
    Please use CLI clear command in document cache mode -- the pattern allows to do complex selections!
    http://pic.dhe.ibm.com/infocenter/wsdatap/v5r0m0/index.jsp?topic=%2Fcom.ibm.dp.xi.doc%2Fcommandreference.xi50453.htm&path%3D4_4_0_18_0

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    Thanks Hermann. That is useful information !
    But is there a way to do this through a SOMA call, that I can integrate in my service ?
  • HermannSW
    HermannSW
    4741 Posts

    Re: Is it possible to flush only selected documents from document cache ?

    ‏2013-02-19T19:21:59Z  
    Thanks Hermann. That is useful information !
    But is there a way to do this through a SOMA call, that I can integrate in my service ?
    > Thanks Hermann. That is useful information !
    > But is there a way to do this through a SOMA call, that I can integrate in my service ?
    >
    Sorry, that is one of the very few commands available in CLI only.

    You can script CLI via ssh though, see this simple example:
    $ cat mem.cli
    admin
    someSecret
    show mem
    exit
    $ 
    $ ssh firestar < mem.cli 
    Pseudo-terminal will not be allocated because stdin is not a terminal.
    (unknown)
    Unauthorized access prohibited.
    login: Password: 
    Welcome to DataPower XI52 console configuration. 
    Copyright IBM Corporation 1999-2012 
     
    Version: XI52.5.0.0.4 build 220449 on 2012/11/13 17:54:25
    Serial number: 6802073
     
    xi52# 
        Memory Usage: 3 %
        Total Memory: 82333842 kilobytes
         Used Memory: 3020098 kilobytes
         Free Memory: 79313744 kilobytes
    Requested Memory: 3596772 kilobytes
         Hold Memory: 576674 kilobytes
     Reserved Memory: 16863558 kilobytes
    Installed Memory: 99197400 kilobytes
     
     
    xi52# Goodbye.
    $
    


     
    Hermann <myXsltBlog/> <myXsltTweets/>
    Updated on 2014-03-25T02:39:46Z at 2014-03-25T02:39:46Z by iron-man
  • DP_learner
    DP_learner
    47 Posts

    Re: Is it possible to flush only selected documents from document cache ?

    ‏2013-02-19T19:53:45Z  
    • HermannSW
    • ‏2013-02-19T19:21:59Z
    > Thanks Hermann. That is useful information !
    > But is there a way to do this through a SOMA call, that I can integrate in my service ?
    >
    Sorry, that is one of the very few commands available in CLI only.

    You can script CLI via ssh though, see this simple example:
    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">$ cat mem.cli admin someSecret show mem exit $ $ ssh firestar < mem.cli Pseudo-terminal will not be allocated because stdin is not a terminal. (unknown) Unauthorized access prohibited. login: Password: Welcome to DataPower XI52 console configuration. Copyright IBM Corporation 1999-2012 Version: XI52.5.0.0.4 build 220449 on 2012/11/13 17:54:25 Serial number: 6802073 xi52# Memory Usage: 3 % Total Memory: 82333842 kilobytes Used Memory: 3020098 kilobytes Free Memory: 79313744 kilobytes Requested Memory: 3596772 kilobytes Hold Memory: 576674 kilobytes Reserved Memory: 16863558 kilobytes Installed Memory: 99197400 kilobytes xi52# Goodbye. $ </pre>

     
    Hermann <myXsltBlog/> <myXsltTweets/>
    Thanks Hermann.