Implemented cache_write, but not giving correct stats.

Both the cache_write and cache_read are implemented but the stats
are off by about 1000 in context and overall misses for both read
and write.