Package list golang-github-renekroon-ttlcache / fresh-releases/main
New upstream release. Debian Janitor 5 months ago
7 changed file(s) with 28 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
0 name: Go
1 on: [push, pull_request]
2 jobs:
3 test:
4 runs-on: ubuntu-latest
5 steps:
6 - name: Set up Go
7 uses: actions/setup-go@v3
8 with:
9 go-version: ^1.15
10 - name: Checkout code
11 uses: actions/checkout@v3
12 - name: Run tests
13 run: go test -race -timeout 1m ./...
+0
-23
.travis.yml less more
0 language: go
1
2 go:
3 - "1.17.x"
4 - "1.16.x"
5
6 git:
7 depth: 1
8
9 install:
10 - go install -race std
11 - go install golang.org/x/tools/cmd/cover
12 - go install golang.org/x/lint/golint
13 - export PATH=$HOME/gopath/bin:$PATH
14 - go get golang.org/x/tools/cmd/cover
15 - go get github.com/mattn/goveralls
16
17 script:
18 - golint .
19 - go test -cover -race -count=1 -timeout=30s -run .
20 - go test -covermode=count -coverprofile=coverage.out -timeout=90s -run .
21 - if test ! -z "$COVERALLS_TOKEN"; then $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
22 - cd bench; go test -run=Bench.* -bench=. -benchmem; cd ..
00 MIT License
11
2 Copyright (c) 2018 Rene Kroon
2 Copyright (c) 2022 Jellydator
33
44 Permission is hereby granted, free of charge, to any person obtaining a copy
55 of this software and associated documentation files (the "Software"), to deal
00 # TTLCache - an in-memory cache with expiration
11
2 [![Documentation](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/ReneKroon/ttlcache/v2)
3 [![Release](https://img.shields.io/github/release/ReneKroon/ttlcache.svg?label=Release)](https://github.com/ReneKroon/ttlcache/releases)
2 **Although v2 of ttlcache is not yet deprecated, v3 should be used as it
3 contains quite a few additions and improvements.**
44
55 TTLCache is a simple key/value cache in golang with the following functions:
66
1414
1515 Note (issue #25): by default, due to historic reasons, the TTL will be reset on each cache hit and you need to explicitly configure the cache to use a TTL that will not get extended.
1616
17 [![Build Status](https://www.travis-ci.com/ReneKroon/ttlcache.svg?branch=master)](https://travis-ci.com/ReneKroon/ttlcache)
18 [![Go Report Card](https://goreportcard.com/badge/github.com/ReneKroon/ttlcache)](https://goreportcard.com/report/github.com/ReneKroon/ttlcache)
19 [![Coverage Status](https://coveralls.io/repos/github/ReneKroon/ttlcache/badge.svg?branch=master)](https://coveralls.io/github/ReneKroon/ttlcache?branch=master)
20 [![GitHub issues](https://img.shields.io/github/issues/ReneKroon/ttlcache.svg)](https://github.com/ReneKroon/ttlcache/issues)
21 [![license](https://img.shields.io/github/license/ReneKroon/ttlcache.svg?maxAge=2592000)](https://github.com/ReneKroon/ttlcache/LICENSE)
22
2317 ## Usage
2418
25 `go get github.com/ReneKroon/ttlcache/v2`
19 `go get github.com/jellydator/ttlcache/v2`
2620
2721 You can copy it as a full standalone demo program. The first snippet is basic usage, where the second exploits more options in the cache.
2822
3428 "fmt"
3529 "time"
3630
37 "github.com/ReneKroon/ttlcache/v2"
31 "github.com/jellydator/ttlcache/v2"
3832 )
3933
4034 var notFound = ttlcache.ErrNotFound
6458 "fmt"
6559 "time"
6660
67 "github.com/ReneKroon/ttlcache/v2"
61 "github.com/jellydator/ttlcache/v2"
6862 )
6963
7064 var (
1111 "fmt"
1212 "sync"
1313
14 . "github.com/ReneKroon/ttlcache/v2"
14 . "github.com/jellydator/ttlcache/v2"
1515 "github.com/stretchr/testify/assert"
1616 )
1717
0 golang-github-renekroon-ttlcache (2.11.1-1) UNRELEASED; urgency=low
1
2 * New upstream release.
3
4 -- Debian Janitor <janitor@jelmer.uk> Sun, 10 Apr 2022 02:08:28 -0000
5
06 golang-github-renekroon-ttlcache (2.11.0+ds-1) unstable; urgency=medium
17
28 * New upstream release.
0 module github.com/ReneKroon/ttlcache/v2
0 module github.com/jellydator/ttlcache/v2
11
22 go 1.15
33