0
votes

what wso2 mediator and package classes implement JSON/REST/HTTP friendly caching? For example, read HTTP headers and URIs to identify cache keys on GET commands, parse JSON (instead of XML) to invalidate cache entry on collection POSTs (with key in payload), and conform with standard HTTP/1.1 header scheme (i.e. https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html ) ??

1

1 Answers

0
votes

You can use Cache Mediator from WSO2 ESB.

<sequence name="SEQ_CACHE">
  <in>
    <cache scope="per-host"
      collector="false"
      hashGenerator="org.wso2.caching.digest.DOMHASHGenerator"
      timeout="20">
      <implementation type="memory" maxSize="100"/>
    </cache>

    <send>
      <endpoint>
        <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
      </endpoint>
    </send>
  </in>

  <out>
    <cache scope="per-host" collector="true"/>
    <send/>
  </out>
</sequence>