Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-77174

Misleading documentation for buffered.increment.enabled property



      There are some very confusing statements in the description for the buffered.increment.enabled portal property. First, it claims that disabling buffered increment logic is not recommended, with no explanation as to why. The truth is that if a user does not want the view counter enabled, then they should disable the buffered increment, as that is the only way to disable the view counter. Secondly the documentation says :

      If disabling buffered increment logic is truly desired, set this property to false, but also remove the BufferedIncrementAdvice bean from base-spring.xml, so annotated service methods are not skipped.

      This makes no sense. Removing the BufferedIncrementAdvice bean from base-spring.xml will cause the service methods to be run (which, in the default implementation, will effectively cause the view counter/downloads counter to be enabled). However, outside of the BufferedIncrementAdvice, everything in the portal (by default) that reads the buffered.increment.enabled portal property treats it as if it indicates whether the view counter/download counter is enabled. So by doing these two things simultaneously, you're effectively telling the portal "I have the view counter/download counter disabled" when it actually is still enabled.

      Compare this with the original documentation written by Shuyang, which explained everything much more clearly:

          # Set this to false to disable buffered increment counter by default, each
          # individual counter can still be enabled by overwriting default setting.
          # Disable means completely skipping invoking the annotated service method.
          # If the intention is to still invoking the service method, but not using
          # the buffered increment logic, this can be achieved by removing
          # BufferedIncrementAdvice wiring from base-spring.xml




            • Assignee:
              sharry.shi Sharry Shi
              michael.bowerman Michael Bowerman (Inactive)
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:
                Days since last comment:
                2 years, 36 weeks, 1 day ago


                Version Package
                7.0.0 DXP FP37
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.1.0 M1