mirror of https://github.com/apache/archiva.git
move cache configuration into Spring context file
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1052117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1055953866
commit
cdcc0f4ded
|
@ -18,7 +18,8 @@
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.archiva</groupId>
|
<groupId>org.apache.archiva</groupId>
|
||||||
<artifactId>archiva-base</artifactId>
|
<artifactId>archiva-base</artifactId>
|
||||||
|
@ -68,24 +69,11 @@
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>descriptor</id>
|
<id>descriptor</id>
|
||||||
<phase>generate-resources</phase>
|
<phase>generate-resources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>generate-metadata</goal>
|
<goal>generate-metadata</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
|
||||||
<id>merge</id>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>merge-metadata</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>${basedir}/src/main/resources/META-INF/plexus/components-fragment.xml</descriptor>
|
|
||||||
<descriptor>${project.build.outputDirectory}/META-INF/plexus/components.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
<component-set>
|
|
||||||
<components>
|
|
||||||
<component>
|
|
||||||
<role>org.codehaus.plexus.cache.Cache</role>
|
|
||||||
<role-hint>url-failures-cache</role-hint>
|
|
||||||
<implementation>org.codehaus.plexus.cache.ehcache.EhcacheCache</implementation>
|
|
||||||
<description>URL Failure Cache</description>
|
|
||||||
<configuration>
|
|
||||||
<disk-expiry-thread-interval-seconds>600</disk-expiry-thread-interval-seconds>
|
|
||||||
<disk-persistent>true</disk-persistent>
|
|
||||||
<disk-store-path>${java.io.tmpdir}/archiva/urlcache</disk-store-path>
|
|
||||||
<eternal>false</eternal>
|
|
||||||
<max-elements-in-memory>1000</max-elements-in-memory>
|
|
||||||
<memory-eviction-policy>LRU</memory-eviction-policy>
|
|
||||||
<name>url-failures-cache</name>
|
|
||||||
<overflow-to-disk>false</overflow-to-disk>
|
|
||||||
<!-- 45 minutes = 2700 seconds -->
|
|
||||||
<time-to-idle-seconds>2700</time-to-idle-seconds>
|
|
||||||
<!-- 30 minutes = 1800 seconds -->
|
|
||||||
<time-to-live-seconds>1800</time-to-live-seconds>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
</components>
|
|
||||||
</component-set>
|
|
|
@ -18,15 +18,29 @@
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
||||||
|
|
||||||
<bean id="urlFailureCache"
|
<bean id="urlFailureCache"
|
||||||
class="org.apache.maven.archiva.policies.urlcache.DefaultUrlFailureCache">
|
class="org.apache.maven.archiva.policies.urlcache.DefaultUrlFailureCache" lazy-init="true">
|
||||||
<!-- collaborators and configuration for this bean go here -->
|
<!-- collaborators and configuration for this bean go here -->
|
||||||
<constructor-arg ref="cache#url-failures-cache"
|
<constructor-arg ref="url-failures-cache"
|
||||||
type="org.codehaus.plexus.cache.Cache" />
|
type="org.codehaus.plexus.cache.Cache"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="url-failures-cache" class="org.codehaus.plexus.cache.ehcache.EhcacheCache" lazy-init="true"
|
||||||
|
destroy-method="dispose">
|
||||||
|
<property name="diskExpiryThreadIntervalSeconds" value="600"/>
|
||||||
|
<property name="diskPersistent" value="true"/>
|
||||||
|
<property name="diskStorePath" value="${java.io.tmpdir}/archiva/urlcache"/>
|
||||||
|
<property name="maxElementsInMemory" value="1000"/>
|
||||||
|
<property name="memoryEvictionPolicy" value="LRU"/>
|
||||||
|
<property name="name" value="url-failures-cache"/>
|
||||||
|
<property name="overflowToDisk" value="false"/>
|
||||||
|
<!-- 45 minutes = 2700 seconds -->
|
||||||
|
<property name="timeToIdleSeconds" value="2700"/>
|
||||||
|
<!-- 30 minutes = 1800 seconds -->
|
||||||
|
<property name="timeToLiveSeconds" value="1800"/>
|
||||||
|
</bean>
|
||||||
</beans>
|
</beans>
|
Loading…
Reference in New Issue