rest
rest copied to clipboard
Enhancement Proposal: *Context.cacheControl()
Recently we deprecated CacheControl.valueOf(String)
, but the replacement is a rather clumsy code line: RuntimeDelegate.getInstance().createHeaderDelegate(CacheControl.class).fromString(value)
. This is very annoying e. g. when migrating filters from 2.x to 3.x.
To make the programmer's life easier, I like to propose that we add support for some syntactic sugar:
- Add new method
cacheControl()
on Client/Server Request/Response Context returning a modifiable instance ofCacheControl
initialized by the content of theCache-Control
header.