-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some docs for Cache class #4375
Conversation
* Create a cache which will reside in {@code directory}. | ||
* | ||
* @param directory a writable directory | ||
* @param maxSize the maximum number of bytes this cache should use to store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add {@code maxSize}
in the sentence above you can drop these two @param
tags. Maybe Create a cache of at most {@code maxSize} bytes in {@code directory}.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Updated
@@ -379,6 +382,7 @@ public long size() throws IOException { | |||
return cache.size(); | |||
} | |||
|
|||
/** Max size of the cache (in bytes). */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@return
?
* commit '1f7e796e6e658df34a98276b2092a81de118937d': Cleanup HttpLoggingInterceptor (square#4346) Add a LoggingEventListener and use it in okcurl (square#4353) Preemptive auth for proxy CONNECT Relax handling of Cache-Control: immutable Add some docs for Cache class (square#4375) Fix connection leaks on failed web socket upgrades. Don't specify a crypto provider in HeldCertificate. Confirm that call timeouts don't apply to SSE or web sockets. Add APIs to configure the client's default call timeout. (square#4369) Recover from executor shutdowns gracefully. (square#4365) Make the nested BasicAuthInterceptor static (square#4368) Add basic auth interceptor recipe (square#4336) Whole operation timeouts Make scheme names case-sensitive again. Remove colon when scheme missing in builder toString (square#4361) CipherSuite init speedup (square#4340) Limit the use of regexes in the RFC 7235 challenge parser. Allow incomplete url builder toString usage (square#4357) APIs to set date headers Upgrade Conscrypt to 1.4.0 (was 1.3.0)
I was looking into the docs and could not see from the constructor what the size was in terms of. Turns out it is bytes. Hopefully this will help others save a step on figuring this out 😉