GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bep/lazycache: Thread safe in-memory LRU cache with non-blocking cache priming on cache misses.

BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
codecov.yml
codecov.yml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
lazycache.go
lazycache.go
 
 
lazycache_test.go
lazycache_test.go
 
 

Repository files navigation

Tests on Linux, MacOS and Windows Go Report Card codecov GoDoc

Lazycache is a simple thread safe in-memory LRU cache. Under the hood it leverages the great simpleru package in golang-lru, with its exellent performance. One big difference between golang-lru and this library is the GetOrCreate method, which provides:

  • Non-blocking cache priming on cache misses.
  • A guarantee that the prime function is only called once for a given key.
  • The cache's RWMutex is not locked during the execution of the prime function, which should make it easier to reason about potential deadlocks.

Other notable features:

  • The API is generic
  • The cache can be resized while running.
  • When the number of entries overflows the defined cache size, the least recently used item gets discarded (LRU).

About

Thread safe in-memory LRU cache with non-blocking cache priming on cache misses.

Topics

cachego-librarylru-cache

Resources

Readme
MIT license
Activity

Stars

23 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

Generated from bep/golibtemplate
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.