func TestCacheSize(t *testing.T) {
	cache := newCache()
	expectedSize := 0
	for i := 0; i < 200; i++ {
		cache.set(fmt.Sprintf("foo%d", i), true)
		expectedSize++
		if expectedSize > 100 {
			expectedSize = 90
		}
		if gotSize := len(cache.cache); gotSize != expectedSize {
			t.Fatalf("iter %d: cache size invalid: expected %d, got %d", i, expectedSize, gotSize)
		}
	}
}
TestCacheSize validates that makeRoom function caps the size of the cache
appropriately.
package web
import (
	"fmt"
	"testing"
)