added method for generate cache hash. set expire time in constructor