fixed multple writing to membus
first impl of cache