Implement the cache set, get, init functions.