mirror of https://github.com/apache/archiva.git
new field to configure ttl for users cache
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1425001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cde61f1cfc
commit
ba2bf91147
|
@ -1493,6 +1493,20 @@
|
|||
<type>boolean</type>
|
||||
<defaultValue>true</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>useUsersCacheTimeToIdleSeconds</name>
|
||||
<description>TimeToIdleSeconds for users cache</description>
|
||||
<version>1.4.0+</version>
|
||||
<type>int</type>
|
||||
<defaultValue>14400</defaultValue>
|
||||
</field>
|
||||
<field>
|
||||
<name>useUsersCacheTimeToLiveSeconds</name>
|
||||
<description>TimeToLiveSeconds for users cache</description>
|
||||
<version>1.4.0+</version>
|
||||
<type>int</type>
|
||||
<defaultValue>14400</defaultValue>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
|
||||
|
|
|
@ -59,6 +59,16 @@ public class RedbackRuntimeConfiguration
|
|||
*/
|
||||
private boolean useUsersCache = false;
|
||||
|
||||
/**
|
||||
* TimeToIdleSeconds for users cache.
|
||||
*/
|
||||
private int useUsersCacheTimeToIdleSeconds = 14400;
|
||||
|
||||
/**
|
||||
* TimeToLiveSeconds for users cache.
|
||||
*/
|
||||
private int useUsersCacheTimeToLiveSeconds = 14400;
|
||||
|
||||
public RedbackRuntimeConfiguration()
|
||||
{
|
||||
// no op
|
||||
|
@ -141,6 +151,26 @@ public class RedbackRuntimeConfiguration
|
|||
this.useUsersCache = useUsersCache;
|
||||
}
|
||||
|
||||
public int getUseUsersCacheTimeToIdleSeconds()
|
||||
{
|
||||
return useUsersCacheTimeToIdleSeconds;
|
||||
}
|
||||
|
||||
public void setUseUsersCacheTimeToIdleSeconds( int useUsersCacheTimeToIdleSeconds )
|
||||
{
|
||||
this.useUsersCacheTimeToIdleSeconds = useUsersCacheTimeToIdleSeconds;
|
||||
}
|
||||
|
||||
public int getUseUsersCacheTimeToLiveSeconds()
|
||||
{
|
||||
return useUsersCacheTimeToLiveSeconds;
|
||||
}
|
||||
|
||||
public void setUseUsersCacheTimeToLiveSeconds( int useUsersCacheTimeToLiveSeconds )
|
||||
{
|
||||
this.useUsersCacheTimeToLiveSeconds = useUsersCacheTimeToLiveSeconds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@ -152,6 +182,8 @@ public class RedbackRuntimeConfiguration
|
|||
sb.append( ", configurationProperties=" ).append( configurationProperties );
|
||||
sb.append( ", configurationPropertiesEntries=" ).append( configurationPropertiesEntries );
|
||||
sb.append( ", useUsersCache=" ).append( useUsersCache );
|
||||
sb.append( ", useUsersCacheTimeToIdleSeconds=" ).append( useUsersCacheTimeToIdleSeconds );
|
||||
sb.append( ", useUsersCacheTimeToLiveSeconds=" ).append( useUsersCacheTimeToLiveSeconds );
|
||||
sb.append( '}' );
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue