Refactor data updates out of cache put
Renamed a var
Refactored some generic get/put cache functions
Fixed typo self to this