code style simplify

cache/memory.go