6 Replies Latest reply: Nov 2, 2012 12:37 PM by karthik chopperla RSS

    promotion deployment in ATG commerce take time

    DolenMeitei
      To reflect the promotion deployment in ATG commerce take around 2/3 hrs. I want the reflection to the site immediately after deployment.

      Edited by: dolen on Oct 30, 2012 12:25 AM
        • 1. Re: promotion deployment in ATG commerce take time
          Nitin Khare
          Couple of general points you may check:

          All the global promotions are retrieved from the database and loaded during server startup. This collection of global promotions is periodically refreshed also so that any new global promotions can also be loaded. There is a /atg/commerce/pricing/GlobalPromotionsDate component which is used for the purpose of refreshing global promotions and it uses a scheduler for this purpose. GlobalPromotionsDate component actually resets the time through scheduler which is used in the query to find available global promotions. So you can check configuration for GlobalPromotionsDate and the involved scheduler.

          You may also check the value of reinitializeTime property in session scoped component /atg/commerce/pricing/UserPricingModels (PricingModelHolder) which holds current user's active promotions. For optimization it is maintained as a session cache. So if any new promotions are given to the customer during the session, PricingModelHolder's initialization methods should be called so that the PricingModelHolder can query the pricing engines again for the new promotions.You can change the reinitializeTime property value but setting it to a very smaller value can affect performance. You can consider reducing the reinitializeTime value if promotions are added frequently and whatever is optimal for your application.

          If none of this is applicable provide more details about the issue you are facing and your environment.
          • 2. Re: promotion deployment in ATG commerce take time
            karthik chopperla
            At one of the client places, we used deployment event to invalidate such secondary caches like PMDLCache. Psuedo code might help you.

            Write a component SecondaryCache and add it to the property deploymentEventListeners in DeploymentAgent component. Java code will look if deployment is not switch and event is of type done_activate to start the flushing process

            SecondaryCache.properties
            $class=atg.epub.SecondaryCache
            cacheToInvalidate=/atg/commerce/pricing/PMDLCache

            SecondaryCache implements DeploymentEventListener
            {
            // Getters setters for the PMDL cache.
            private atg.service.cache.Cache PMDLCache
            public Cache getPMDLCache(){
            return PMDLCache
            }
            public void setPMDLCache(Cache cache) {
            this.PMDLCache=cache
            }
            public void deploymentEvent(DeploymentEvent pEvent){
            if( pEvent.getNewState()==Status.DONE_ACTIVATE ) {
                      PMDLCache.flush();          
            }
            }
            }

            HTH
            -karthik
            • 3. Re: promotion deployment in ATG commerce take time
              DolenMeitei
              Thank you Nitin And Karthik for your reply. It's not possible to do using Configuring Selective Cache Invalidation. Please read this one http://docs.oracle.com/cd/E26180_01/Platform.94/ATGCAProgGuide/html/s1104configuringselectivecacheinvalid01.html
              • 4. Re: promotion deployment in ATG commerce take time
                Praveer.Rai
                Is the issue resolved ? If yes please mention how you resolved it .
                • 5. Re: promotion deployment in ATG commerce take time
                  Nitin Khare
                  The selective cache invalidation you are mentioning is meant for repository level caching. What Karthik and I mentioned above is about promotion specific cache which AFAIK is different from repository level cache. Therefore I think it may not be affected by selective cache invalidation.
                  • 6. Re: promotion deployment in ATG commerce take time
                    karthik chopperla
                    OOTB never flushes PMDLCache, price caches after deployment. It worked well for us. SCI( selective cache invalidation) is for target repository items.

                    -karthik