basic cache saving
add test for new cache functionality