Caching 托管存储缓存不工作
我的缓存块从不工作,总是对相同的值发出http请求Caching 托管存储缓存不工作,caching,mule,mule-studio,mule-component,Caching,Mule,Mule Studio,Mule Component,我的缓存块从不工作,总是对相同的值发出http请求 <ee:object-store-caching-strategy name="eventIdCachingStrategy" doc:name="Autobulk EventID Caching Strategy" keyGenerationExpression="#[flowVars['ablMapEventToListingParameters']]"> <managed-store storeNa
<ee:object-store-caching-strategy name="eventIdCachingStrategy" doc:name="Autobulk EventID Caching Strategy" keyGenerationExpression="#[flowVars['ablMapEventToListingParameters']]">
<managed-store storeName="${xyz.eventid.cache.store.name}" persistent="true" maxEntries="${xyz.eventid.cache.max.entries}" entryTTL="${xyz.eventid.cache.entry.timetolive}" expirationInterval="${xyz.eventid.cache.expiration.interval}" />
</ee:object-store-caching-strategy>
<sub-flow name="mapEventsForListings" doc:name="mapEventsForListings">
<logger message="Entering mapEventsForListings flow..." level="INFO" doc:name="Logger"/>
<set-variable variableName="mapEventsForListingsTimeInMillis" value="#[new java.util.Date().getTime()]" doc:name="Set Entry Time In Millis"/>
<foreach doc:name="Map Event ID to each listing">
<choice doc:name="Choice">
<when expression="#[payload.getEvent().getVenue().isEmpty() || payload.getEvent().getDate().isEmpty() || payload.getExternalListingId().isEmpty() || payload.getPricePerProduct().getAmount()==0]">
<logger message="Missing input data for Payload" level="INFO" doc:name="Listing Missing Data Fields"/>
<set-variable variableName="noOfIncompleteListings" value="#[noOfIncompleteListings + 1]" doc:name="Increment Incomplete Listings Error Count"/>
</when>
<otherwise>
<set-variable variableName="ablMapEventToListingParameters" value="/?locale=en_US&venueName=#[payload.getEvent().getVenue()]&eventDateLocal=#[payload.getEvent().getDate()]" doc:name="Autobulk Event Search Parameters"/>
<set-variable variableName="originalListingRequest" value="#[payload]" doc:name="Variable"/>
<set-payload value="#[null]" doc:name="Set Payload"/>
<ee:cache doc:name="Cache" cachingStrategy-ref="eventIdCachingStrategy">
<https:outbound-endpoint exchange-pattern="request-response" method="GET" connector-ref="HttpsClientConnector" address="${xyz.search.catalog.events.ship.api.url}#[flowVars['ablMapEventToListingParameters']]" contentType="application/json" doc:name="HTTP Outbound Call to BulkCreateListing API">
<message-properties-transformer scope="outbound">
<add-message-property key="TARGET_HOST" value="${target.host}"/>
<add-message-property key="Authorization" value="#[flowVars['shUserBearerToken']]"/>
<add-message-property key="Content-Type" value="application/json"/>
</message-properties-transformer>
</https:outbound-endpoint>
<echo-component doc:name="Echo"/>
</ee:cache>
</otherwise>
</choice>
</flow>
flowVars的值['ablMapToListingParameters']=www.api-dev.xyz.com/search/catalog/events/ship/v3/?locale=en_US&venueName=SAPCenter&eventDateLocal=2015-07-16T20:00尝试以下配置:-
<ee:object-store-caching-strategy name="cachingStrategy" doc:name="cachingStrategy">
<managed-store storeName="myNonPersistentManagedObjectStore" maxEntries="-1" entryTTL="20000" expirationInterval="5000"/>
</ee:object-store-caching-strategy>
此外,您正在缓存作用域之前设置有效负载null。。。缓存作用域要求负载确定是否可以缓存响应。对于相同的负载,它将进行缓存命中并提供来自缓存的响应,否则它将处理消息并将其存储在缓存中
参考:-尝试以下配置:-
<ee:object-store-caching-strategy name="cachingStrategy" doc:name="cachingStrategy">
<managed-store storeName="myNonPersistentManagedObjectStore" maxEntries="-1" entryTTL="20000" expirationInterval="5000"/>
</ee:object-store-caching-strategy>
此外,您正在缓存作用域之前设置有效负载null。。。缓存作用域要求负载确定是否可以缓存响应。对于相同的负载,它将进行缓存命中并提供来自缓存的响应,否则它将处理消息并将其存储在缓存中
参考:-尝试以下配置:-
<ee:object-store-caching-strategy name="cachingStrategy" doc:name="cachingStrategy">
<managed-store storeName="myNonPersistentManagedObjectStore" maxEntries="-1" entryTTL="20000" expirationInterval="5000"/>
</ee:object-store-caching-strategy>
此外,您正在缓存作用域之前设置有效负载null。。。缓存作用域要求负载确定是否可以缓存响应。对于相同的负载,它将进行缓存命中并提供来自缓存的响应,否则它将处理消息并将其存储在缓存中
参考:-尝试以下配置:-
<ee:object-store-caching-strategy name="cachingStrategy" doc:name="cachingStrategy">
<managed-store storeName="myNonPersistentManagedObjectStore" maxEntries="-1" entryTTL="20000" expirationInterval="5000"/>
</ee:object-store-caching-strategy>
此外,您正在缓存作用域之前设置有效负载null。。。缓存作用域要求负载确定是否可以缓存响应。对于相同的负载,它将进行缓存命中并提供来自缓存的响应,否则它将处理消息并将其存储在缓存中 参考:-