Added cache initialization functionality

Leveraged most of the code from the CA3 implementation