<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.transient.store.config">

  <#if "${nuxeo.redis.enabled}" == "true">
    <#assign className = "org.nuxeo.ecm.core.redis.contribs.RedisTransientStore" />
  <#else>
    <#assign className = "org.nuxeo.ecm.core.transientstore.SimpleTransientStore" />
  </#if>

  <extension target="org.nuxeo.ecm.core.transientstore.TransientStorageComponent"
    point="store">

    <store name="default" class="${className}">
      <targetMaxSizeMB>-1</targetMaxSizeMB>
      <absoluteMaxSizeMB>-1</absoluteMaxSizeMB>
      <firstLevelTTL>240</firstLevelTTL>
      <secondLevelTTL>10</secondLevelTTL>
      <minimalRetention>10</minimalRetention>
    </store>

    <store name="authorizationRequestStore" class="${className}">
      <targetMaxSizeMB>-1</targetMaxSizeMB>
      <absoluteMaxSizeMB>-1</absoluteMaxSizeMB>
      <firstLevelTTL>10</firstLevelTTL>
      <secondLevelTTL>0</secondLevelTTL>
    </store>

  </extension>

</component>
