Skip to content

Commit 2ef80a4

Browse files
authored
Merge pull request #116 from hyp3rd/feat/dist-mem-cache
fix(dist): set LastAccess timestamp when decoding distributed cache i…
2 parents 71d48e3 + 2928733 commit 2ef80a4

10 files changed

Lines changed: 18 additions & 17 deletions

File tree

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ run:
4242
# Define the Go version limit.
4343
# Mainly related to generics support since go1.18.
4444
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17
45-
go: "1.26.2"
45+
go: "1.26.3"
4646

4747
linters:
4848
# Enable specific linter

.mdl_style.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# allow_different_nesting permits same-text headings as long as they sit
1313
# under distinct parent headings — which is exactly the Keep-a-Changelog
1414
# shape, and still catches genuine duplicates within the same section.
15-
rule "MD024", :allow_different_nesting => true, :siblings_only => true
16-
15+
# rule "MD024", :siblings_only => true, :allow_different_nesting => true
16+
exclude_rule "MD024"
1717
# MkDocs pages start with YAML frontmatter (---\ntitle: ...\n---), so
1818
# the first line cannot be a top-level heading. MD041 fights that
1919
# convention; the alternative would be losing per-page metadata.

.pre-commit/golangci-lint-hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if [[ -f "${ROOT_DIR}/.project-settings.env" ]]; then
2323
# shellcheck disable=SC1090
2424
source "${ROOT_DIR}/.project-settings.env"
2525
fi
26-
GOLANGCI_LINT_VERSION="${GOLANGCI_LINT_VERSION:-v2.12.1}"
26+
GOLANGCI_LINT_VERSION="${GOLANGCI_LINT_VERSION:-v2.12.2}"
2727

2828
# #######################################
2929
# Install dependencies to run the pre-commit hook

.pre-commit/unit-test-hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ hook() {
2121
local root_dir
2222
root_dir=$(git rev-parse --show-toplevel)
2323

24-
local toolchain_version="1.26.2"
24+
local toolchain_version="1.26.3"
2525
if [[ -f "${root_dir}/.project-settings.env" ]]; then
2626
# shellcheck disable=SC1090
2727
source "${root_dir}/.project-settings.env"

.project-settings.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
GOLANGCI_LINT_VERSION=v2.12.1
1+
GOLANGCI_LINT_VERSION=v2.12.2
22
BUF_VERSION=v1.69.0
3-
GO_VERSION=1.26.2
3+
GO_VERSION=1.26.3
44
GCI_PREFIX=github.com/hyp3rd/hypercache
55
PROTO_ENABLED=false

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ Worth surfacing for contributors:
639639
`pkg/backend/dist_memory_test_helpers.go::EnableHTTPForTest`
640640
(build tag `test`).
641641
- **Lint discipline:** 35 `nolint` directives total across the repo,
642-
each with a one-line justification. golangci-lint v2.12.1 runs
642+
each with a one-line justification. golangci-lint v2.12.2 runs
643643
clean with `--build-tags test`.
644644

645645
### Removed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
include .project-settings.env
22

3-
GOLANGCI_LINT_VERSION ?= v2.12.1
3+
GOLANGCI_LINT_VERSION ?= v2.12.2
44
BUF_VERSION ?= v1.69.0
5-
GO_VERSION ?= 1.26.2
5+
GO_VERSION ?= 1.26.3
66
GCI_PREFIX ?= github.com/hyp3rd/hypercache
77
PROTO_ENABLED ?= true
88

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hyp3rd/hypercache
22

3-
go 1.26.2
3+
go 1.26.3
44

55
require (
66
github.com/cespare/xxhash/v2 v2.3.0
@@ -39,6 +39,6 @@ require (
3939
go.uber.org/atomic v1.11.0 // indirect
4040
golang.org/x/crypto v0.50.0 // indirect
4141
golang.org/x/net v0.53.0 // indirect
42-
golang.org/x/sys v0.43.0 // indirect
43-
golang.org/x/text v0.36.0 // indirect
42+
golang.org/x/sys v0.44.0 // indirect
43+
golang.org/x/text v0.37.0 // indirect
4444
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI=
8989
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=
9090
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
9191
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
92-
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
93-
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
94-
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
95-
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
92+
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
93+
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
94+
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
95+
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
9696
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
9797
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
9898
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

pkg/backend/dist_http_transport.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ func decodeGetBody(r io.Reader) (*cache.Item, bool, error) {
289289
Version: mirror.Version,
290290
Origin: mirror.Origin,
291291
LastUpdated: time.Now(),
292+
LastAccess: time.Now(),
292293
}, true, nil
293294
}
294295

0 commit comments

Comments
 (0)