Set-Associative Cache in C#, Part 2: Interface Design

This is part 2 of a three-part series on implementing a set-associative cache in C#. In part 1, we looked at how set-associative caches work and sketched out the basic design. In this part, we’ll expand on the design a bit more and define a code interface for the cache. In part 3, we’ll turn …
Continue reading Set-Associative Cache in C#, Part 2: Interface Design

Set-Associative Cache in C#, Part 1: Analysis & Initial Design

A couple of weeks ago, I had never heard of a set-associative cache. Then, I was assigned an interview exercise on HackerRank entitled “Set-Associative Cache Optimization”. (I won’t give away the company or any details about the exercise, since that wouldn’t be fair.) Since I hadn’t heard of such a cache, I decided to learn …
Continue reading Set-Associative Cache in C#, Part 1: Analysis & Initial Design