
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
github.com/SebastiaanPasterkamp/go-cache
Advanced tools
A uniform cache repository interface for multiple implementations. Supports in-memory (internal), and redis (external).
import (
"context"
"time"
"github.com/SebastiaanPasterkamp/go-cache"
)
func example() {
ctx := context.Background()
// This configuration is for demonstration purpose only. Only one of the
// settings will be used to initialize the cache where in-memory takes
// the priority.
test := cache.Configuration{
// Demonstrate the in-memory cache implementation, which should work
// as an example
InMemorySettings: &cache.InMemorySettings{},
// For real-world use-cases use the Redis settings instead
RedisSettings: &cache.RedisSettings{
Address: "redis-host:6379",
Password: "S3(r37!", // Please configure this using an environment variable
Database: 0,
},
}
c, err := test.Factory(ctx)
if err != nil {
log.Fatalf("Failed to initialize cache: %v", err)
}
err = c.Set(ctx, "key", "value", 5*time.Second)
if err != nil {
log.Fatalf("Failed to store cache item: %v", err)
}
value := ""
err = c.Get(ctx, "key", &value)
if err != nil {
log.Fatalf("Failed to retrieve cache item: %v", err)
}
err = c.Del(ctx, "key")
if err != nil {
log.Fatalf("Failed to delete cache item: %v", err)
}
log.Printf("Value retrieved: %q\n", value)
}
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.