Skip to content

Commit

Permalink
Parameterise cacheDuration in generated metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Jul 1, 2020
1 parent 41514e4 commit f8ed8f9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@
<!-- Same value, as an ISO 8601 duration. -->
<property name="validUntil.perEntity.duration" value="P${validUntil.perEntity.days}D"/>

<!-- Default cacheDuration for all generated metadata, as an ISO 8601 duration. -->
<property name="cacheDuration.default.duration" value="PT6H"/>
<!-- Specific cacheDuration for aggregates. -->
<property name="cacheDuration.aggregate.duration" value="${cacheDuration.default.duration}"/>
<!-- Specific cacheDuration for per-entity metadata. -->
<property name="cacheDuration.perEntity.duration" value="${cacheDuration.default.duration}"/>

<!--
***************************************************************
*** ***
Expand Down Expand Up @@ -1576,6 +1583,8 @@
-->
<property name="mda.java.endorsed.dirs" value="${tools.dir}/endorsed"/>
<property name="mda.blocklists.dir" value="${blocklists.dir}"/>
<property name="mda.cacheDuration.aggregate.duration" value="${cacheDuration.aggregate.duration}"/>
<property name="mda.cacheDuration.perEntity.duration" value="${cacheDuration.perEntity.duration}"/>
<property name="mda.edugain.dir" value="${edugain.dir}"/>
<property name="mda.entities.dir" value="${entities.dir}"/>
<property name="mda.mdx.dir" value="${mdx.dir}"/>
Expand Down
6 changes: 4 additions & 2 deletions mdx/uk/generate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@

<ref bean="uk_strip_UKFederationMember"/>
<ref bean="assembleAggregate"/>
<bean parent="mda.SetCacheDurationStage" p:cacheDuration="PT6H"/>
<bean parent="mda.SetCacheDurationStage"
p:cacheDuration="${cacheDuration.aggregate.duration}"/>
<ref bean="stripEntityScopes"/>
<ref bean="uk_finaliseTest"/>
<ref bean="uk_normaliseTest"/>
Expand Down Expand Up @@ -854,7 +855,8 @@
<ref bean="assembleAggregate"/>
<ref bean="stripEntityScopes"/>
<ref bean="stripEmptyExtensions"/>
<bean parent="mda.SetCacheDurationStage" p:cacheDuration="PT6H"/>
<bean parent="mda.SetCacheDurationStage"
p:cacheDuration="${cacheDuration.aggregate.duration}"/>
<ref bean="uk_finaliseExport"/>

<bean id="uk_normaliseExportPreview" parent="mda.XSLTransformationStage"
Expand Down
2 changes: 1 addition & 1 deletion mdx/uk/mdq-multisign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<bean parent="ukf.FixedStringIdentifierGenerationStrategy" c:_="_"/>
</constructor-arg>
</bean>
<bean parent="mda.SetCacheDurationStage" p:cacheDuration="PT6H"/>
<bean parent="mda.SetCacheDurationStage" p:cacheDuration="${cacheDuration.perEntity.duration}"/>
<bean parent="mda.SetValidUntilStage" p:validityDuration="${validUntil.perEntity.duration}"/>

<!-- Identity transform fixes signing issues. -->
Expand Down

0 comments on commit f8ed8f9

Please sign in to comment.