That's about it, except you have to keep track of the total size of your cache so you know when to start evicting. I didn't mean that it couldn't be done, I just thought that one hour was a bit short. I tried it myself and, after setting up tests for the common use cases and tracing down all of the memory errors, it took closer to an hour and 45 minutes. I suppose if the author wasn't looking for perfection, but for something quick and dirty, it wouldn't be so unreasonable.