Package org.opensaml.saml.saml2.common

# Interface CacheableSAMLObject

All Superinterfaces:
  `SAMLObject`, `XMLObject`

All Known Subinterfaces:
  `AffiliationDescriptor`, `AttributeAuthorityDescriptor`, `AttributeQueryDescriptorType`, `AuthnAuthorityDescriptor`, `AuthnQueryDescriptorType`, `AuthzDecisionQueryDescriptorType`, `EntitiesDescriptor`, `EntityDescriptor`, `IDPSSODescriptor`, `PDPDescriptor`, `QueryDescriptorType`, `RoleDescriptor`, `SPSSODescriptor`, `SSODescriptor`

All Known Implementing Classes:
  `AffiliationDescriptorImpl`, `AttributeAuthorityDescriptorImpl`, `AttributeQueryDescriptorTypeImpl`, `AuthnAuthorityDescriptorImpl`, `AuthnQueryDescriptorTypeImpl`, `AuthzDecisionQueryDescriptorTypeImpl`, `EntitiesDescriptorImpl`, `EntityDescriptorImpl`, `IDPSSODescriptorImpl`, `PDPDescriptorImpl`, `QueryDescriptorTypeImpl`, `RoleDescriptorImpl`, `RoleDescriptorXSAnyAdapter`, `SPSSODescriptorImpl`, `SSODescriptorImpl`

public interface CacheableSAMLObject extends SAMLObject
A functional interface for SAMLElements that provide cache duration information.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CACHE_DURATION_ATTRIB_NAME`
"cacheDuration" attribute name.
`static final QName`
`CACHE_DURATION_ATTRIB_QNAME`
"cacheDuration" attribute QName.

## Method Summary

Modifier and Type
Method
Description
`Duration`
`getCacheDuration()`
Gets the maximum time that this descriptor should be cached.
`void`
`setCacheDuration(Duration duration)`
Sets the maximum time that this descriptor should be cached.

### Methods inherited from interface org.opensaml.core.xml.XMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getOrderedChildren, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation`

## Field Details

### CACHE_DURATION_ATTRIB_NAME

@Nonnull @NotEmpty static final String CACHE_DURATION_ATTRIB_NAME
"cacheDuration" attribute name.

See Also:
  - Constant Field Values

### CACHE_DURATION_ATTRIB_QNAME

@Nonnull static final QName CACHE_DURATION_ATTRIB_QNAME
"cacheDuration" attribute QName.

## Method Details

### getCacheDuration

@Nullable Duration getCacheDuration()
Gets the maximum time that this descriptor should be cached.

Returns:
  the maximum time that this descriptor should be cached

### setCacheDuration

void setCacheDuration(@Nullable Duration duration)
Sets the maximum time that this descriptor should be cached.

Parameters:
  `duration` - the maximum time that this descriptor should be cached