public final class DiskLruHttpCacheStore extends java.lang.Object implements HttpCacheStore
| Constructor and Description |
|---|
DiskLruHttpCacheStore(java.io.File directory,
long maxSize) |
DiskLruHttpCacheStore(okhttp3.internal.io.FileSystem fileSystem,
java.io.File directory,
long maxSize) |
| Modifier and Type | Method and Description |
|---|---|
HttpCacheRecord |
cacheRecord(java.lang.String cacheKey)
Returns ResponseCacheRecord for the entry named cacheKey or null if it doesn't exist or is not currently readable.
|
HttpCacheRecordEditor |
cacheRecordEditor(java.lang.String cacheKey)
Returns an editor for the entry named cacheKey or null if another edit is in progress.
|
void |
delete()
Closes the cache and deletes all of its stored values.
|
void |
remove(java.lang.String cacheKey)
Drops the entry for key if it exists and can be removed.
|
public DiskLruHttpCacheStore(@Nonnull
java.io.File directory,
long maxSize)
public DiskLruHttpCacheStore(@Nonnull
okhttp3.internal.io.FileSystem fileSystem,
@Nonnull
java.io.File directory,
long maxSize)
public HttpCacheRecord cacheRecord(@Nonnull java.lang.String cacheKey) throws java.io.IOException
HttpCacheStorecacheRecord in interface HttpCacheStorecacheKey - the name of the entryjava.io.IOExceptionpublic HttpCacheRecordEditor cacheRecordEditor(@Nonnull java.lang.String cacheKey) throws java.io.IOException
HttpCacheStorecacheRecordEditor in interface HttpCacheStorecacheKey - the entry to edit.HttpCacheRecordEditor to use for editing the entryjava.io.IOExceptionpublic void delete()
throws java.io.IOException
HttpCacheStoredelete in interface HttpCacheStorejava.io.IOExceptionpublic void remove(@Nonnull
java.lang.String cacheKey)
throws java.io.IOException
HttpCacheStoreremove in interface HttpCacheStorejava.io.IOException