[
https://issues.apache.org/jira/browse/SOLR-505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598884#action_12598884
]
Otis Gospodnetic commented on SOLR-505:
---------------------------------------
Yes, I think we should get this in 1.3.
I took a quick look at the patch and saw this:
{code}rsp.setAvoidHttpCaching(false);{code}
Am I the only one who has a harder time reading negative methods like this,
esp. when they take false?
Would it not be nicer to just have:
{code}rsp.setHttpCaching(true/false);{code}
or even
{code}rsp.httpCachingOn() + rsp.httpCachingOff(){code}
Similarly, instead of {code}isAvoidHttpCaching(){code} have
{code}isHttpCachingOn(){code}
I know this is "just naming", but I think it helps with readability a bit.
I notice the unit test mods are not in the patch. Is there no need to test the
modified behaviour?
> Give RequestHandlers the possiblity to suppress the generation of HTTP
> caching headers
> --------------------------------------------------------------------------------------
>
> Key: SOLR-505
> URL: https://issues.apache.org/jira/browse/SOLR-505
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 1.3
> Reporter: Thomas Peuss
> Fix For: 1.3
>
> Attachments: SOLR-505.patch, SOLR-505.patch
>
>
> The code from SOLR-127 emits HTTP cache headers for all handlers if
> configured. We should not emit cache related headers for update request
> handlers. Partial responses (coming from the Timeout request stuff) should
> not be cached as well.
> To solve this problem we can simply add two methods to the SolrQueryResponse
> class (like void setAvoidHTTPCaching(boolean) and boolean
> isAvoidHTTPCaching() - the default for the value would be false). The update
> request handlers should set this to true all the time. The partial response
> stuff can set this to true as well.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.