Adds ReplacementCache module

Some unit tests included.