Clear cache programmatically

 I have a usecase where modifications are made to a CI and published. We need to expire the cache on both management and live stage. I am using ContentUtil to do that. I recursivly clear the entire page cache for the CI. The problem is that the cache expires on the management stage but not live. I do see that the request was received to clear cache but, iI still see the old content. Also, the cache expire request is only being received for the CI and not the other components/regions.

Anyone else has done this before and knows whats going on?

Comments

  • I think that if you traverse the referringcontent tree up to the Component that renders the CI, you should be ableto just clear the cache for that Component.  This assumes you areusing [something similar] to the default caching scheme.




    From:       "eLink Entry:Vignette V7 and V8 Web Content Management" <v7webcontentmanagement@elinkkc.opentext.com>
    To:       "eLink Recipient"<devnull@elinkkc.opentext.com>
    Date:       02/08/2011 11:25 AM
    Subject:       Clear cacheprogrammatically

    Clearcache programmatically  
    Posted by a.girard@ratchet.com(Girard, Alex) On 2011/02/08 11:30
     

     I have a usecase where modifications are made toa CI and published. We need to expire the cache on both management andlive stage. I am using ContentUtil to do that. I recursivly clear the entirepage cache for the CI. The problem is that the cache expires on the managementstage but not live. I do see that the request was received to clear cachebut, iI still see the old content. Also, the cache expire request is onlybeing received for the CI and not the other components/regions.

    Anyone else has done this before and knows whats goingon?


    [To post a comment, use the normal replyfunction]
    Forum: VignetteV7 and V8 Web Content Management
    Livelink Server: knowledge-wlweb01
  •  That's what I did. Like I said, it clears mgmt stage cache but, not live.

  • you need to call  SysUtil.performDeliveryServerAction("expireFromCache", vcmid).

    there is an overloaded method accepting string array, but that doesn't work all the time for us.

  •  Thanks  Let me try that.

  •  Still doesn't clear cache on the live instance

  • Alex,

    You have to call the clear cache method from the context of the delivery app server.  How are you getting this request over to the delivery app server to be executed?

    Thanks,

    Bill

  •  Alex,

    We also handle all of this through our listeners that are installed in the mgmt and delivery stages where DPM/DSM has been configured.  Our DPM/DSM listener will clear the mgmt cache when the object is updated on the mgmt stage and will clear the cache for the delivery stage when the object is published to that stage.

    Thanks,

    Bill

  •  Hello Bill,

            Do you mind telling me what is the listener name you are talking about?

    Thanks.

    Regards,
    TRX
     

  •  The listener name is:

    com.vignette.ext.templating.cache.DeploymentEventListener

    Which should be on the all three deployment events for the stage.  The listener should be added to all applicable events when you configure DPM/DSM for the stage.

    Thanks,

    Bill

  •  Looks like you are using the default listeners. Did you have to do any customizations?

  • I am also trying to create the custom Deployment event listener which clears the cache when we update and published any content. I passed the vcmid of the CI in the below method, but it didnt clear the cache on delivery stages and still showing old contents.

    SysUtil.performDeliveryServerAction("expireFromCache", vcmid);

    Has anyone achieved this?

    Appreciating any thought or suggestion on this...

    Thanks!

  • Which version of product you are using currently?

     

    You should not need to do this, if cache for content item is not clearing for you, you may have some other configuration issue in your environment. In case you are talking about clearing the cache for HTML Fragments then it can typically be done from preview tools menu for the site on per page/template basis.

     

    I am talking about WEM 8.0 & 8.1

     

    Thanks & Regards

     

    Qutubuddin Saifuddin
    Senior Consultant  I  America Services Organization

    Phone:     (732) 354 4423
    Mobile:    (732) 397 7951

    Website:  www.opentext.com

     


    This email message is confidential, may be privileged, and is intended for the exclusive use of the addressee. Any other person is strictly prohibited from disclosing orreproducing it. If the addressee cannot be reached or is unknown to you, please inform the sender by return email and delete this email message and all copies immediately.

     

    From: eLink Entry: Discussion Group - Web Experience Management [mailto:v7webcontentmanagement@elinkkc.opentext.com]
    Sent: Tuesday, February 05, 2013 11:11 AM
    To: eLink Recipient
    Subject: Re Clear cache programmatically

     

    Re Clear cache programmatically

     

    Posted byvikas.neekhra@xcelenergy.com (Neekhra, Vikas) On 02-05-2013 11:07

     

     

    I am also trying to create the custom Deployment event listener which clears the cache when we update and published any content. I passed thevcmid of the CI in the below method, but it didnt clear the cache on delivery stages and still showing old contents.

    SysUtil.performDeliveryServerAction("expireFromCache", vcmid);

    Has anyone achieved this?

    Appreciating any thought or suggestion on this...

    Thanks!


    [To post a comment, use the normal reply function]

    Topic:

    Clear cache programmatically

    Forum:

    Discussion Group - Web Experience Management

    Content Server:

    Knowledge Center