add hash and prefix methods to cache class