function write cache, dirty valid bit introduced, lru checking