simulation of a cache in regards to flushing, updating, and replacing bytes for the purpose of data access optimization with a focus on locality