allow setting cache on get and getall
adding some debug stuff. to be finished later