Merge branch '8784-dir-listings'
[arvados.git] / services / keep-web / main.go
index 5f4cb5090468708ce02d34ec5f74d9baf80720a5..c4103f409723fbc3c7bbbc3bbd8edcbf7184be42 100644 (file)
@@ -1,9 +1,14 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
        "flag"
        "log"
        "os"
+       "time"
 
        "git.curoverse.com/arvados.git/sdk/go/arvados"
        "git.curoverse.com/arvados.git/sdk/go/config"
@@ -24,6 +29,8 @@ type Config struct {
        AttachmentOnlyHost string
        TrustAllContent    bool
 
+       Cache cache
+
        // Hack to support old command line flag, which is a bool
        // meaning "get actual token from environment".
        deprecatedAllowAnonymous bool
@@ -33,6 +40,13 @@ type Config struct {
 func DefaultConfig() *Config {
        return &Config{
                Listen: ":80",
+               Cache: cache{
+                       TTL:                  arvados.Duration(5 * time.Minute),
+                       MaxCollectionEntries: 1000,
+                       MaxCollectionBytes:   100000000,
+                       MaxPermissionEntries: 1000,
+                       MaxUUIDEntries:       1000,
+               },
        }
 }