added riak stuff, added cache