Skip to content

Commit

Permalink
修改配置项
Browse files Browse the repository at this point in the history
  • Loading branch information
rjlatgithub committed Aug 19, 2017
1 parent c83386a commit 940a71a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,18 @@ public class Configuration {

private long memoryCacheTime;

private boolean async;

private String cacheDir;

public Configuration(){}

public Configuration(String cacheDir,
int memoryCacheCount, long memoryCacheTime,
int diskCacheCount, long diskCacheTime,
boolean async) {
int diskCacheCount, long diskCacheTime) {
this.cacheDir = cacheDir;
this.memoryCacheCount = memoryCacheCount;
this.memoryCacheTime = memoryCacheTime;
this.diskCacheCount = diskCacheCount;
this.diskCacheTime = diskCacheTime;
this.async = async;
}

public int getDiskCacheCount() {
Expand Down Expand Up @@ -69,14 +65,6 @@ public void setMemoryCacheTime(long memoryCacheTime) {
this.memoryCacheTime = memoryCacheTime;
}

public boolean isAsync() {
return async;
}

public void setAsync(boolean async) {
this.async = async;
}

public String getCacheDir() {
return cacheDir;
}
Expand Down Expand Up @@ -138,7 +126,7 @@ public Builder async(boolean async) {

public Configuration build() {
return new Configuration(cacheDir, diskCacheCount, diskCacheTime,
memoryCacheCount, memoryCacheTime, doAsync);
memoryCacheCount, memoryCacheTime);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ public class DefaultConfiguration extends Configuration {
public DefaultConfiguration(Context context) {
super(context.getCacheDir().getAbsolutePath(),
DEFAULT_MEMORY_CACHE_COUNT, Configuration.DAY,
DEFAULT_DISK_CACHE_COUNT, Configuration.MONTH, false);
DEFAULT_DISK_CACHE_COUNT, Configuration.MONTH);
}
}

0 comments on commit 940a71a

Please sign in to comment.