mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
+ add XML support for cache abstraction (cache-advice) - DRAFT
This commit is contained in:
org.springframework.context/src/main/resources/org/springframework/cache/config/spring-cache-3.1.xsd
Vendored
+108
@@ -89,4 +89,112 @@
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="advice">
|
||||
<xsd:complexType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.cache.interceptor.CacheInterceptor"><![CDATA[
|
||||
Defines the cache semantics of the AOP advice that is to be
|
||||
executed.
|
||||
|
||||
That is, this advice element is where the cacheable semantics of
|
||||
any number of methods are defined (where cacheable semantics
|
||||
includes the backing cache(s), the key, cache condition rules, and suchlike).
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation>
|
||||
<tool:exports type="java:org.springframework.cache.interceptor.CacheInterceptor"/>
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="beans:identifiedType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="definitions" type="definitionsType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="cache-manager" type="xsd:string" default="cacheManager">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.cache.CacheManager"><![CDATA[
|
||||
The bean name of the CacheManager that is to be used
|
||||
for storing and retrieving data.
|
||||
|
||||
This attribute is not required, and only needs to be specified
|
||||
explicitly if the bean name of the desired CacheManager
|
||||
is not 'cacheManager'.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="org.springframework.cache.CacheManager"/>
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="basedefinitionType">
|
||||
<xsd:attribute name="cache" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The name of the backing cache(s). Multiple caches can be specified by separating them using comma: 'orders, books']]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="key" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The SpEL expression used for computing the cache key.]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="condition" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The SpEL expression used for conditioning the method caching.]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="definitionType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="basedefinitionType">
|
||||
<xsd:attribute name="method" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The method name(s) with which the cache attributes are to be
|
||||
associated. The wildcard (*) character can be used to associate the
|
||||
same cache attribute settings with a number of methods; for
|
||||
example, 'get*', 'handle*', '*Order', 'on*Event', etc.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="definitionsType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="basedefinitionType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice>
|
||||
<xsd:element name="cacheable" minOccurs="0" maxOccurs="unbounded" type="definitionType"/>
|
||||
<xsd:element name="cache-evict" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="definitionType">
|
||||
<xsd:attribute name="all-entries" type="xsd:boolean" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The name of the backing cache.]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
||||
Reference in New Issue
Block a user