File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -199,17 +199,20 @@ func NewClientFromCSAPIClient(cs *cloudstack.CloudStackClient) Client {
199
199
return c
200
200
}
201
201
202
+ // generateClientCacheKey generates a cache key from a Config
202
203
func generateClientCacheKey (conf Config ) string {
203
204
return fmt .Sprintf ("%+v" , conf )
204
205
}
205
206
207
+ // newClientCache returns a new instance of client cache
206
208
func newClientCache (clientConfig * corev1.ConfigMap ) * ttlcache.Cache {
207
209
clientCache := ttlcache .NewCache ()
208
210
clientCache .SetTTL (GetClientCacheTTL (clientConfig ))
209
211
clientCache .SkipTtlExtensionOnHit (false )
210
212
return clientCache
211
213
}
212
214
215
+ // GetClientCacheTTL returns a client cache TTL duration from the passed config map
213
216
func GetClientCacheTTL (clientConfig * corev1.ConfigMap ) time.Duration {
214
217
var cacheTTL time.Duration
215
218
if clientConfig != nil {
You can’t perform that action at this time.
0 commit comments