Giter Club home page Giter Club logo

cache's Introduction

cache

GoDoc Go Report Card MIT License discord

This go module provides a very simple in-memory key/value cache. It uses no mutex locks; utilizing only 1 go routine, 2 channels, and 1 or 2 tickers depending on if you enable the pruner. The module also exports git/miss statistics that you can plug into expvar, or other metrics modules.

This module has a concept of pruning. Items can be marked prunable, or not prunable. Those marked prunable are deleted after they have not had a get requst within a specified duration. Those marked not-prunable have a different configurable maximum unused age.

I wrote this to cache data from mysql queries for an nginx auth proxy. See a simple example in cache_test.go.

cache's People

Contributors

davidnewhall avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

cache's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/codetests.yml
  • actions/checkout v4
  • actions/setup-go v5
  • actions/setup-go v5
  • actions/checkout v4
  • golangci/golangci-lint-action v6
  • actions/setup-go v5
  • actions/checkout v4
  • golangci/golangci-lint-action v6
gomod
go.mod
  • go 1.21

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.