File: profilecache.go

package info (click to toggle)
golang-github-akamai-akamaiopen-edgegrid-golang 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,408 kB
  • sloc: sh: 532; makefile: 3
file content (23 lines) | stat: -rw-r--r-- 420 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package edgegrid

import (
	"time"

	"github.com/patrickmn/go-cache"
	gocache "github.com/patrickmn/go-cache"
)

// Config struct provides all the necessary fields to
// create authorization header, debug is optional
type (
	profileCache gocache.Cache
)

// Init initializes cache
//

// See: InitCache()
func InitCache() (gocache.Cache, error) {
	cache := cache.New(5*time.Minute, 10*time.Minute)
	return *cache, nil
}