> } else {
> - byte[] content = closeClientButKeepContentStream(response);
> - //TODO: what is the error when the session token expires??
> - if (content != null && new String(content).contains("lease
> renew")) {
> - logger.debug("invalidating authentication token");
> + closeClientButKeepContentStream(response);
> + // This is not an authentication request returning 401
> + // Check if we already had seen this request
> + Integer count = retryCountMap.getIfPresent(command);
> +
> + if (count == null) {
Can you avoid this logic by giving a default value to the builder, e.g.,
```java
CacheBuilder.newBuilder().build(new CacheLoader<HttpCommand, Integer>() {
@Override
public Integer load(HttpCommand command) {
return 1;
}
});
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/104/files#r6357472