配置快取以擷取使用者流量資料

如果要設定對使用者流量資料所執行的快取層次,請執行下列步驟:

  1. 開啟位於下列目錄中的 instance_name.xml 檔:
    AIXLinuxSun Solaris 作業環境WC_installdir/instances/instance_name/xml
    WindowsWC_installdir\instances\instance_name\xml
  2. 找出類似如下的程式碼片段。在範例片段中,以粗體顯示的元素會控制使用者流量日誌記載的快取層次。設為 1, 可確保每當要求 URL 時,即會將資料寫入 USRTRAFFIC 表格中。舉例來說, 如果設為 20,則會在要求 20 個 URL 後,才會將資料寫到 USRTRAFFIC 表格中。 此數字越少,對效能的影響可能越大。
    <LogSystem name="Log System">
       <messageLog display="false" notification="false"
            notificationClassName="com.ibm.commerce.messaging.ras.ErrorNotificationHandler" />
       <activityLog display="false">
    <userTraffic cacheSize="20" />
          <accessLogging cacheSize="32" logAllRequests="false" />
       </activityLog>
    </LogSystem>
    
  3. 此外,在您的 instance_name.xml 檔中,下列範例片段內的 <start> 元素值, 必須設為 true:
    <component compClassName="com.ibm.commerce.event.usertraffic.UserTrafficEventListener"
         enable="true" name="UserTrafficEventListener">
       <property display="false">
          <start enabled="true" />
       </property>
      </component>