You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Jonathan Moore (JIRA)" <ji...@apache.org> on 2010/08/11 19:34:16 UTC

[jira] Created: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

provide an ehcache implementation for HttpCache
-----------------------------------------------

                 Key: HTTPCLIENT-978
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
             Project: HttpComponents HttpClient
          Issue Type: New Feature
          Components: Cache
            Reporter: Jonathan Moore


Provide an implementation of the HttpCache interface that stores cache entries in ehcache.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Jonathan Moore (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897350#action_12897350 ] 

Jonathan Moore commented on HTTPCLIENT-978:
-------------------------------------------

Again, we have some code we are dusting off to solidify (and adhere to the updated HttpCache interface) and contribute.

Major question to answer is how the contribution should be structured:
(a) new top-level module in httpcomponents-client (e.g. httpclient-cache-ehcache)?
(b) new sub-package as part of httpclient-cache?


> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-978.
------------------------------------------

    Resolution: Fixed

Patch checked in with some changes to the exception handling code. Please review.

For the time being I added a sub-class of IOException called HttpCacheOperationException, which can be used to signal cache operation failures. While strictly speaking HttpCacheOperationException does not represent an I/O error, I am not sure if such distinction is worth the trouble of having to propagate HttpCacheOperationException in each and every method of HttpCacheStorage and HttpCache. Feel free to suggest a more elegant solution.

TestEhcacheHttpCache renamed to TestEhcacheHttpCacheStorage. 

Michajlo, many thanks for contributing the patch.

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: ehcache_w_serialization.patch, ehcache_w_serialization3.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898736#action_12898736 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

Patch checked in with some very minor tweaks to the test cases and dependency definitions. 

Throwing plain IOException definitely does not sound right. Feel free to introduce a specific exception class for failed updates.

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michajlo Matijkiw updated HTTPCLIENT-978:
-----------------------------------------

    Attachment: cache_update_exception.diff

I have renamed HttpCacheOperationException to HttpCacheUpdateException, and it no longer extends IOException (you will probably have to delete HttpCacheOperationException.java after applying the patch, it should be empty).  I spoke with Jonathan Moore and it was decided that this is best since the exception should never make it outside of the cache module, and without extending IOException the compiler will guarantee it.

CacheConfig now has a field for maximum number of update retries, and after that many failed update retries, EhcacheHttpCacheStorage will throw the exception.  The exception is caught by BasicHttpCache and a warning is logged.  While a failed update is not ideal, subsequent accesses will re-validate the entry.

The tests were also updated to verify the behavior with failed updates.

This patch was submitted with the permission of my employer.

Thanks,
Michajlo

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: cache_update_exception.diff, ehcache_w_serialization.patch, ehcache_w_serialization3.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900220#action_12900220 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

Already done. I'll try to cut a new release of HttpCore in the coming days / weeks

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: ehcache_w_serialization.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902389#action_12902389 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

> I believe the eventual goal is to use the HttpCacheOperationException to trigger a configurable number of retries on update failure, 
> so the current implementation can be reevaluated at that point if necessary.

Could HttpCacheUpdateException be a better name for such exception? It could also contain a piece of information (just a Boolean attribute) indicating whether or not the failure is fatal. The consumer of HttpCacheStorage implementation could choose to catch the exception and retry the operation, if the failure is non fatal. HttpCacheUpdateException may still extend IOException for the sake of simplicity. 

> A quick fix, my coworker pointed out a small bug in TestHttpCacheEntrySerializers, line 86, "one.getAllHeaders()" should be "two.getAllHeaders()". 

Fixed.

Cheers

Oleg


> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: ehcache_w_serialization.patch, ehcache_w_serialization3.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michajlo Matijkiw updated HTTPCLIENT-978:
-----------------------------------------

    Attachment: httpclient-cache_ehcache-patch.patch

This patch adds the package org.apache.http.impl.client.cache.ehcache, and a few tests for it.  The package contains a single class, EhcacheHttpCache, which is a simple HttpCache implementation build around ehcache.  The pom.xml was also updated to add the ehcache java interface and its dependency, slf4j.  There are a total of 2 new files, and one modified.

This patch is contributed with the permission of my employer.

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: httpclient-cache_ehcache-patch.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899999#action_12899999 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

Michajlo,

I am fine with reintroducing HttpCacheEntrySerializer but I am somewhat reluctant to introduce a dependency on jettison if it can be avoided. I think we should provide a very simple serializer based on standard java object serialization code. We should also fix HttpCacheEntry. I guess HttpCacheEntry serialization breaks due to BasicStatusLine being non-serializable. I am going to fix in HttpCore.

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: ehcache_w_serialization.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michajlo Matijkiw updated HTTPCLIENT-978:
-----------------------------------------

    Attachment: ehcache_w_serialization3.patch

This patch includes the following changes:
  - Bought up to date to reflect Jonathan Moore's recent reorganization patch
  - Reintroduction of HttpCacheEntrySerializer interface, and reintroduction/reworking of DefaultCacheEntrySerializer 
  - Fixed TestEhcacheProtocolRequirements name Protcol/Protocol typo, the mispelled version should be deleted if it still exists
  - Updated TestEhcacheHttpCache tests- added testCacheGetNullEntry, testCacheUpdateNullEntry, and testCacheUpdate 
  - Fixed update bug

Some notes:
  - DefaultCacheEntrySerializer makes the assumption that the underlying Set implementation used to hold variants is serializable, I feel like this is a pretty safe assumption
  - It might be better practice to create a wrapper object as in intermediary for serialization in DefaultCacheEntrySerializer, but the current version should only be a temporary fix until the new httpcore is released, then we will be able to serialize HttpCacheEntry directly
  - Should TestEhcacheHttpCache be renamed to TestEhcacheHttpCacheStorage?  I can update the patch to include this, but I thought it might be easier to do on your end after the problems with the Protcol/Protocol typo.

Adding HttpCacheOperationException for failed updates is turning out to be a little more involved than I had expected, so I was planning on adding this in a later patch.

Please let me know if there's anything else you would like me to include or change.

This patch is submitted with the permission of my employer.

Thank you,
Michajlo

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: ehcache_w_serialization.patch, ehcache_w_serialization3.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901393#action_12901393 ] 

Michajlo Matijkiw commented on HTTPCLIENT-978:
----------------------------------------------

I agree, I think extending IOException is fine for now.  I believe the eventual goal is to use the HttpCacheOperationException to trigger a configurable number of retries on update failure, so the current implementation can be reevaluated at that point if necessary.

A quick fix, my coworker pointed out a small bug in TestHttpCacheEntrySerializers, line 86, "one.getAllHeaders()" should be "two.getAllHeaders()".  I looked over the rest of the file and all seems good.

Thanks,
Michajlo

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: ehcache_w_serialization.patch, ehcache_w_serialization3.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903576#action_12903576 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

Patch checked in. Many thanks, Michajlo

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: cache_update_exception.diff, ehcache_w_serialization.patch, ehcache_w_serialization3.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900043#action_12900043 ] 

Michajlo Matijkiw commented on HTTPCLIENT-978:
----------------------------------------------

Would it also be possible to make BasicHeader serializable?

Thank you,
Michajlo

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: ehcache_w_serialization.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897975#action_12897975 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

Michajlo 

There has been a number of changes to the caching API. Could you please rebuild your patch based the latest code snapshot from SVN trunk?

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: httpclient-cache_ehcache-patch.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michajlo Matijkiw updated HTTPCLIENT-978:
-----------------------------------------

    Attachment: ehcache_w_serialization.patch

We have updated the ehcache implementation to support a disk based ehcache.  Since some members of HttpCacheEntry are not Serializable, they could only be stored in memory, and would not be able to be written to disk.

We reintroduced the HttpCacheEntrySerializer interface and added an implementation, JSONCacheEntrySerializer.  The HttpCacheEntrySerializer interfaced is used by ehcache to serialize HttpCacheEntrys to be stored in the cache.  This interface will also be used by the memcached interface we are working on bringing to date.

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: ehcache_w_serialization.patch, httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897383#action_12897383 ] 

Oleg Kalnichevski commented on HTTPCLIENT-978:
----------------------------------------------

Both options are possible. If we are talking just two to three impl classes a whole new module might be on overkill, so option B would be preferred.

Oleg

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-978) provide an ehcache implementation for HttpCache

Posted by "Michajlo Matijkiw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michajlo Matijkiw updated HTTPCLIENT-978:
-----------------------------------------

    Attachment: httpclient-cache_ehcache-patch2.patch

Sorry about that, I have attached the updated patch against the trunk.

Most remains the same from the last cache, I have made all of EhcacheHttpCache's operations synchronized.  I have also added another test which runs the protocol requirement tests against a CachingHttpClientCache using the Ehcache backend.

Something that should be discussed is behavior on a failed update.  In the event of multiple EhcacheHttpCache instances updating the same cache they may trample eachothers' data on update.  For now we do a compare and swap update, and throw an IOException on failure.  This might be a good case to reintroduce the HttpCacheOperationException.  Having a configurable number of retries before throwing an exception is another option to explore.

> provide an ehcache implementation for HttpCache
> -----------------------------------------------
>
>                 Key: HTTPCLIENT-978
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-978
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: Cache
>            Reporter: Jonathan Moore
>         Attachments: httpclient-cache_ehcache-patch.patch, httpclient-cache_ehcache-patch2.patch
>
>
> Provide an implementation of the HttpCache interface that stores cache entries in ehcache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org