Implemented the cache inversion functions