@@ -45,7 +45,7 @@ func TestDiskCache(t *testing.T) {
45
45
})
46
46
47
47
// new
48
- cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" , false )
48
+ cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" )
49
49
assert .Nil (t , err )
50
50
defer cache .Close (ctx )
51
51
@@ -130,7 +130,7 @@ func TestDiskCache(t *testing.T) {
130
130
testRead (cache )
131
131
132
132
// new cache instance and read
133
- cache , err = NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" , false )
133
+ cache , err = NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" )
134
134
assert .Nil (t , err )
135
135
defer cache .Close (ctx )
136
136
@@ -139,7 +139,7 @@ func TestDiskCache(t *testing.T) {
139
139
assert .Equal (t , 1 , numWritten )
140
140
141
141
// new cache instance and update
142
- cache , err = NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" , false )
142
+ cache , err = NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" )
143
143
assert .Nil (t , err )
144
144
defer cache .Close (ctx )
145
145
@@ -159,7 +159,7 @@ func TestDiskCacheWriteAgain(t *testing.T) {
159
159
var counterSet perfcounter.CounterSet
160
160
ctx = perfcounter .WithCounterSet (ctx , & counterSet )
161
161
162
- cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (4096 ), nil , false , nil , "" , false )
162
+ cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (4096 ), nil , false , nil , "" )
163
163
assert .Nil (t , err )
164
164
defer cache .Close (ctx )
165
165
@@ -224,7 +224,7 @@ func TestDiskCacheWriteAgain(t *testing.T) {
224
224
func TestDiskCacheFileCache (t * testing.T ) {
225
225
dir := t .TempDir ()
226
226
ctx := context .Background ()
227
- cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" , false )
227
+ cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" )
228
228
assert .Nil (t , err )
229
229
defer cache .Close (ctx )
230
230
@@ -284,7 +284,7 @@ func TestDiskCacheDirSize(t *testing.T) {
284
284
285
285
dir := t .TempDir ()
286
286
capacity := 1 << 20
287
- cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (int64 (capacity )), nil , false , nil , "" , false )
287
+ cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (int64 (capacity )), nil , false , nil , "" )
288
288
assert .Nil (t , err )
289
289
defer cache .Close (ctx )
290
290
@@ -347,7 +347,6 @@ func benchmarkDiskCacheWriteThenRead(
347
347
false ,
348
348
nil ,
349
349
"" ,
350
- false ,
351
350
)
352
351
if err != nil {
353
352
b .Fatal (err )
@@ -443,7 +442,6 @@ func benchmarkDiskCacheReadRandomOffsetAtLargeFile(
443
442
false ,
444
443
nil ,
445
444
"" ,
446
- false ,
447
445
)
448
446
if err != nil {
449
447
b .Fatal (err )
@@ -515,7 +513,6 @@ func BenchmarkDiskCacheMultipleIOEntries(b *testing.B) {
515
513
false ,
516
514
nil ,
517
515
"" ,
518
- false ,
519
516
)
520
517
if err != nil {
521
518
b .Fatal (err )
@@ -587,7 +584,7 @@ func TestDiskCacheClearFiles(t *testing.T) {
587
584
assert .Nil (t , err )
588
585
numFiles := len (files )
589
586
590
- _ , err = NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" , false )
587
+ _ , err = NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" )
591
588
assert .Nil (t , err )
592
589
593
590
files , err = filepath .Glob (filepath .Join (dir , "*" ))
@@ -601,7 +598,7 @@ func TestDiskCacheClearFiles(t *testing.T) {
601
598
func TestDiskCacheBadWrite (t * testing.T ) {
602
599
dir := t .TempDir ()
603
600
ctx := context .Background ()
604
- cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" , false )
601
+ cache , err := NewDiskCache (ctx , dir , fscache .ConstCapacity (1 << 20 ), nil , false , nil , "" )
605
602
assert .Nil (t , err )
606
603
607
604
written , err := cache .writeFile (
@@ -636,7 +633,6 @@ func TestDiskCacheGlobalSizeHint(t *testing.T) {
636
633
false ,
637
634
nil ,
638
635
"test" ,
639
- false ,
640
636
)
641
637
assert .Nil (t , err )
642
638
defer cache .Close (ctx )
@@ -669,7 +665,7 @@ func TestDiskCacheGlobalSizeHint(t *testing.T) {
669
665
670
666
func TestDiskCacheSetFromFile (t * testing.T ) {
671
667
ctx := context .Background ()
672
- cache , err := NewDiskCache (ctx , t .TempDir (), fscache .ConstCapacity (1 << 30 ), nil , false , nil , "" , false )
668
+ cache , err := NewDiskCache (ctx , t .TempDir (), fscache .ConstCapacity (1 << 30 ), nil , false , nil , "" )
673
669
require .Nil (t , err )
674
670
defer cache .Close (ctx )
675
671
@@ -694,7 +690,7 @@ func TestDiskCacheSetFromFile(t *testing.T) {
694
690
695
691
func TestDiskCacheQuotaExceeded (t * testing.T ) {
696
692
ctx := context .Background ()
697
- cache , err := NewDiskCache (ctx , t .TempDir (), fscache .ConstCapacity (3 ), nil , false , nil , "" , false )
693
+ cache , err := NewDiskCache (ctx , t .TempDir (), fscache .ConstCapacity (3 ), nil , false , nil , "" )
698
694
require .Nil (t , err )
699
695
defer cache .Close (ctx )
700
696
0 commit comments