Unico Hommes wrote:
Carsten Ziegeler wrote:
Unico Hommes wrote:Yeah I had been thinkin along the same lines. I like the colon notation because it resembles familiar namespace notation. So I'll go with your latter suggestion.
I'd also like to change the protocol URL a little bit. Since the timeout parameter will only be applicable to the delay refresher implementation and not to the event aware one I think it would be better to specify it with a query parameter instead.
Current syntax: cache://[EMAIL PROTECTED]@http://www.apache.org/
Proposed syntax: cache:http://www.apache.org/?cache-expires=60&cache-name=main
The protocol:subprotocol syntax is also more in line with well established conventions such as in jdbc for instance.
Let me know if you have any objections or comments.
No objections from me, but the parameters must have clear names, which means there shouldn't be a conflict. Imagine:
cache:http://www.apache.org/?cache-expires=60&cache-name=main&expires=500
(Dumb example, I know) But what I mean is that the real url/source could also have parameters and it must be clear which ones are for the cache source and which ones are for the real source, so perhaps something like "cocoon-cache..." or perhaps better using invalid names like "cocoon:cache=60"?
Does it make sense to have it both ways? So, say, you can use either: cache:main:[EMAIL PROTECTED]://www.apache.org/ or: cache:@http://www.apache.org/?cache:name=main&cache:expires=60 ?
Hmm, I would prefer to settle on just one syntax. Prevents confusion and minimizes amount of code to maintain. Also what to do when expiration value is not applicable? Ignore it or throw an exception. I think we should keep it as simple as possible.
Unico