add discard to cache and data

Change-Id: I1f88cb3b559dfb84b3dea97c1747da806c9f914c