cache the get() method

add test for "get sets cache"
flush cache on write operations