| Original |
|---|
1 private CacheBuilderFactory cacheFactory() {
2
3
4
5
6
7
8 return new CacheBuilderFactory()
9 .withKeyStrengths(ImmutableSet.of(Strength.STRONG, Strength.WEAK))
10 .withValueStrengths(ImmutableSet.copyOf(Strength.values()))
11 .withConcurrencyLevels(ImmutableSet.of(1, 4, 16, 64))
12 .withMaximumSizes(ImmutableSet.of(400, 1000))
13 .withInitialCapacities(ImmutableSet.of(0, 1, 10, 100, 1000))
14 .withExpirations(ImmutableSet.of(
15 ExpirationSpec.afterAccess(10, SECONDS),
16 ExpirationSpec.afterAccess(1, DAYS),
17 ExpirationSpec.afterWrite(10, SECONDS),
18 ExpirationSpec.afterWrite(1, DAYS)))
18 ;
19 }
20
|
| | Modified |
|---|
1 private CacheBuilderFactory cacheFactory() {
2
3
4
5
6
7
8 return new CacheBuilderFactory()
9 .withKeyStrengths(ImmutableSet.of(Strength.STRONG, Strength.WEAK))
10 .withValueStrengths(ImmutableSet.copyOf(Strength.values()))
11 .withConcurrencyLevels(ImmutableSet.of(1, 4, 16, 64))
12 .withMaximumSizes(ImmutableSet.of(400, 1000))
13 .withInitialCapacities(ImmutableSet.of(0, 1, 10, 100, 1000))
14 .
14 withExpireAfterWrites(ImmutableSet.of(
15
16 DurationSpec.of(1, SECONDS),
17 DurationSpec.of(1, DAYS)))
18 .withExpireAfterAccesses(ImmutableSet.of(
19
20 DurationSpec.of(1, SECONDS),
21 DurationSpec.of(1, DAYS)))
22 .withRefreshes(ImmutableSet.of(
23
24 DurationSpec.of(1, SECONDS),
25 DurationSpec.of(1, DAYS)));
26 }
27
|
|