Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheGetRequest ¶
func CacheGetRequest(ctx context.Context, uri string, cacheDuration time.Duration, errorCacheDuration time.Duration, headers ...struct { Key string Value string }) (*cachedGetRequest, error)
Send a GET request to an endpoint and cache the result
func GetCollectionSize ¶
func GetCollectionSize(ctx context.Context, collection string, q interface{}, opts ...*options.CountOptions) (int64, error)
Gets the collection size then caches it in redis for some time
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.