Adding some cache functionality.