@@ -68,19 +68,21 @@ instance DefaultConfig DBConfig where
6868data VVAConfigInternal
6969 = VVAConfigInternal
7070 { -- | db-sync database access.
71- vVAConfigInternalDbsyncconfig :: DBConfig
71+ vVAConfigInternalDbsyncconfig :: DBConfig
7272 -- | Server port.
73- , vVAConfigInternalPort :: Int
73+ , vVAConfigInternalPort :: Int
7474 -- | Server host.
75- , vVAConfigInternalHost :: Text
75+ , vVAConfigInternalHost :: Text
7676 -- | Request cache duration
77- , vVaConfigInternalCacheDurationSeconds :: Int
77+ , vVaConfigInternalCacheDurationSeconds :: Int
78+ -- | DRep List request cache duration
79+ , vVaConfigInternalDRepListCacheDurationSeconds :: Int
7880 -- | Sentry DSN
79- , vVAConfigInternalSentrydsn :: String
81+ , vVAConfigInternalSentrydsn :: String
8082 -- | Sentry environment
81- , vVAConfigInternalSentryEnv :: String
83+ , vVAConfigInternalSentryEnv :: String
8284 -- | Pinata API JWT
83- , vVAConfigInternalPinataApiJwt :: Maybe Text
85+ , vVAConfigInternalPinataApiJwt :: Maybe Text
8486 }
8587 deriving (FromConfig , Generic , Show )
8688
@@ -92,6 +94,7 @@ instance DefaultConfig VVAConfigInternal where
9294 vVAConfigInternalPort = 3000 ,
9395 vVAConfigInternalHost = " localhost" ,
9496 vVaConfigInternalCacheDurationSeconds = 20 ,
97+ vVaConfigInternalDRepListCacheDurationSeconds = 600 ,
9598 vVAConfigInternalSentrydsn
= " https://username:[email protected] /id" ,
9699 vVAConfigInternalSentryEnv = " development" ,
97100 vVAConfigInternalPinataApiJwt = Nothing
@@ -101,19 +104,21 @@ instance DefaultConfig VVAConfigInternal where
101104data VVAConfig
102105 = VVAConfig
103106 { -- | db-sync database credentials.
104- dbSyncConnectionString :: Text
107+ dbSyncConnectionString :: Text
105108 -- | Server port.
106- , serverPort :: Int
109+ , serverPort :: Int
107110 -- | Server host.
108- , serverHost :: Text
111+ , serverHost :: Text
109112 -- | Request cache duration
110- , cacheDurationSeconds :: Int
113+ , cacheDurationSeconds :: Int
114+ -- | DRep List request cache duration
115+ , dRepListCacheDurationSeconds :: Int
111116 -- | Sentry DSN
112- , sentryDSN :: String
117+ , sentryDSN :: String
113118 -- | Sentry environment
114- , sentryEnv :: String
119+ , sentryEnv :: String
115120 -- | Pinata API JWT
116- , pinataApiJwt :: Maybe Text
121+ , pinataApiJwt :: Maybe Text
117122 }
118123 deriving (Generic , Show , ToJSON )
119124
@@ -153,6 +158,7 @@ convertConfig VVAConfigInternal {..} =
153158 serverPort = vVAConfigInternalPort,
154159 serverHost = vVAConfigInternalHost,
155160 cacheDurationSeconds = vVaConfigInternalCacheDurationSeconds,
161+ dRepListCacheDurationSeconds = vVaConfigInternalDRepListCacheDurationSeconds,
156162 sentryDSN = vVAConfigInternalSentrydsn,
157163 sentryEnv = vVAConfigInternalSentryEnv,
158164 pinataApiJwt = vVAConfigInternalPinataApiJwt
0 commit comments