Skip to content

fabientownsend/tiny-cache

Repository files navigation

I want to learn how a cache work!

When cache are used everywhere in the software industry, I had no idea how it work. This is why I wrote this tiny cache.

The idea here is present the different concepts of a cache and make it easy to understand.

  • Cache hit and hit ration
  • Cache miss
  • Storage cost
  • Retrieval complexity
  • Replacement policy

Here is the code

Demo

ruby demo.rb

Tests

rspec cache_spec.rb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages