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

    MIT License

    Copyright (c) 2020-present Cloudogu GmbH and Contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

-->
<caches>
    
  <defaultCache 
    maximumSize="200" 
    expireAfterAccess="1200" 
    expireAfterWrite="2400"
  />
  
  <!--
    External group cache
    average: 1K
  -->
    
  <cache
    name="sonia.cache.externalGroups"
    maximumSize="1000"
    expireAfterAccess="60"
    expireAfterWrite="120"
  />
  
  <!--
    Authorization cache
    average: 3K
  -->
  <cache
    name="sonia.cache.authorizing"
    maximumSize="1000"
    expireAfterAccess="1200" 
    expireAfterWrite="2400"
    copyStrategy="read"
  />
  
  <!--
    PluginCenter cache
    average: 30K
  -->
  <cache
    name="sonia.cache.plugins"
    maximumSize="5"
    expireAfterWrite="3600"
  />

  <!--
  UpdateInfo cache
  average: 30K
-->
  <cache
    name="sonia.cache.updateInfo"
    maximumSize="1"
    expireAfterWrite="3600"
  />

  <!-- 
    Search cache for users
    average: 0.5K
  -->
  <cache
    name="sonia.cache.search.users"
    maximumSize="10000"
    expireAfterWrite="5400"
  />

  <!-- 
    Search cache for groups
    average: 0.5K
  -->
  <cache
    name="sonia.cache.search.groups"
    maximumSize="1000"
    expireAfterWrite="5400"
  />
  
  <!-- repository api -->
  
  <!--
    Changeset cache
    average: 25K
  -->
  <cache
    name="sonia.cache.cmd.log"
    maximumSize="500"
    copyStrategy="read-write"
  />
  
  <!--
    FileObject cache
    average: 1.5K
  -->
  <cache
    name="sonia.cache.cmd.browse"
    maximumSize="3000"
    copyStrategy="read-write"
  />

  <!--
    BlameResult cache
    average: 15K
  -->
  <cache
    name="sonia.cache.cmd.blame"
    maximumSize="1000"
    copyStrategy="read-write"
  />
  
  <!--
    Tag cache
    average: 5K
  -->
  <cache
    name="sonia.cache.cmd.tags"
    maximumSize="500"
  />
  
  <!--
    Branch cache
    average: 2.5K
  -->
  <cache
    name="sonia.cache.cmd.branches"
    maximumSize="500"
  />

</caches>
