From ba2bf9114778efa4754ff465cb3a7bc34c368af8 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 21 Dec 2012 16:25:42 +0000 Subject: 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 --- .../src/main/mdo/configuration.mdo | 14 ++++++++++ .../model/beans/RedbackRuntimeConfiguration.java | 32 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) (limited to 'archiva-modules/archiva-base') diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo index 99a82dad2..db9f7a49c 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo @@ -1493,6 +1493,20 @@ boolean true + + useUsersCacheTimeToIdleSeconds + TimeToIdleSeconds for users cache + 1.4.0+ + int + 14400 + + + useUsersCacheTimeToLiveSeconds + TimeToLiveSeconds for users cache + 1.4.0+ + int + 14400 + diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java index cda3d4d52..a21d213ce 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java @@ -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(); } -- cgit v1.2.3