Hi Asanka, The question is not about the cache mediator. It is about the standard way of including a list of values in a configuration parameter in a custom mediator. As to answer your question, by the requirements[1], it should be possible for us to allow the user to specify a list of headers which he does not want to hashed like the "timestamp" header because hashing it would mean all request messages would give a different hash.
[1] https://docs.google.com/document/d/1iPtArrW6C-VgzAzjjSsLmG9aqAFEubmFgNkQhoDvqz8/edit On Fri, Jul 14, 2017 at 12:02 PM, Asanka Abeyweera <asank...@wso2.com> wrote: > Hi Riyafa, > > Can't we remove the unwanted headers before pushing to cache so that we > don't have to use "headersToExcludeInHash" in cache mediator? > > On Fri, Jul 14, 2017 at 11:53 AM, Riyafa Abdul Hameed <riy...@wso2.com> > wrote: > >> Hi, >> >> I am creating a custom mediator and one of the configuration parameters >> would have to take as input a list of values. What is the best or standard >> way to do this? I plan to take in string with comma separated values and >> split it by the commas and then trim it to get the values in the list. >> Would that work? >> >> To elaborate more consider the syntax for cache mediator: >> >> <cache [id="string"] [hashGenerator="class"] [timeout="seconds"] >> [scope=(per-host | per-mediator)] collector=(true | false) >> [maxMessageSize="in-bytes"] hTTPMethodToCache = (GET | POST)] >> >> headersToExcludeInHash=”comma separated list of headers”> >> >> <onCacheHit [sequence="key"] [continueExecution=(true | false)]> >> >> (mediator)+ >> >> </onCacheHit>? >> >> <implementation maxMessagesInCachemaxSize="int"/> >> >> </cache> >> >> >> if the value for the "headersToExcludeInHash" needs to be a list, is it >> correct to take as input a list of comma separated values in a single >> string? >> >> >> Thank you. >> >> Yours faithfully, >> >> Riyafa >> >> -- >> Riyafa Abdul Hameed >> Software Engineer, WSO2 Lanka (Pvt) Ltd <http://wso2.com/> >> >> Email: riy...@wso2.com <riyafa...@cse.mrt.ac.lk> >> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/> >> <http://facebook.com/riyafa.ahf> <http://lk.linkedin.com/in/riyafa> >> <http://twitter.com/Riyafa1> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Asanka Abeyweera > Senior Software Engineer > WSO2 Inc. > > Phone: +94 712228648 <+94%2071%20222%208648> > Blog: a5anka.github.io > > <https://wso2.com/signature> > -- Riyafa Abdul Hameed Software Engineer, WSO2 Lanka (Pvt) Ltd <http://wso2.com/> Email: riy...@wso2.com <riyafa...@cse.mrt.ac.lk> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/> <http://facebook.com/riyafa.ahf> <http://lk.linkedin.com/in/riyafa> <http://twitter.com/Riyafa1>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev