<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2003-2011 eXo Platform SAS.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.

-->

<configuration
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
    xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

  <external-component-plugins>
    <target-component>org.exoplatform.services.cache.CacheService</target-component>
    <component-plugin>
      <name>addExoCacheConfig</name>
      <set-method>addExoCacheConfig</set-method>
      <type>org.exoplatform.services.cache.ExoCacheConfigPlugin</type>
      <description></description>
      <init-params>

        <!-- Categories -->
        <object-param>
          <name>forum.CategoryData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.CategoryData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.CategoryData.Capacity:10}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.CategoryData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>
        <object-param>
          <name>forum.CategoryList</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.CategoryList</string></field>
            <field name="maxSize"><int>${cache.exo.forum.CategoryList.Capacity:5}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.CategoryList.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- Forums -->
        <object-param>
          <name>forum.ForumData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.ForumData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.ForumData.Capacity:150}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.ForumData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>
        <object-param>
          <name>forum.ForumList</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.ForumList</string></field>
            <field name="maxSize"><int>${cache.exo.forum.ForumList.Capacity:30}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.ForumList.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- Topics -->
        <object-param>
          <name>forum.TopicData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.TopicData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.TopicData.Capacity:500}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.TopicData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- Post -->
        <object-param>
          <name>forum.PostData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.PostData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.PostData.Capacity:3000}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.PostData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>
        <object-param>
          <name>forum.PostList</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.PostList</string></field>
            <field name="maxSize"><int>${cache.exo.forum.PostList.Capacity:150}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.PostList.TimeToLive:86400}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>
        <object-param>
          <name>forum.PostListCount</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.PostListCount</string></field>
            <field name="maxSize"><int>${cache.exo.forum.PostListCount.Capacity:150}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.PostListCount.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>
        
        <!-- BBCode -->
        <object-param>
          <name>forum.BBCodeData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.BBCodeData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.BBCodeData.Capacity:3000}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.BBCodeData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>
        <object-param>
          <name>forum.BBCodeListData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.BBCodeListData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.BBCodeListData.Capacity:10}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.BBCodeListData.TimeToLive:86400}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- Watches -->
        <object-param>
          <name>forum.WatchListData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.WatchListData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.WatchListData.Capacity:300}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.WatchListData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- Links -->
        <object-param>
          <name>forum.LinkListData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.LinkListData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.LinkListData.Capacity:150}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.LinkListData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- ObjectNameData -->
        <object-param>
          <name>forum.ObjectNameData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.ObjectNameData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.ObjectNameData.Capacity:1800}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.ObjectNameData.TimeToLive:-1}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

        <!-- MiscData -->
        <object-param>
          <name>forum.MiscData</name>
          <description></description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name"><string>forum.MiscData</string></field>
            <field name="maxSize"><int>${cache.exo.forum.MiscData.Capacity:600}</int></field>
            <field name="liveTime"><long>${cache.exo.forum.MiscData.TimeToLive:86400}</long></field>
            <field name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
          </object>
        </object-param>

      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>
