Do more cache invalidation, fix return values.
Merge pull request #311 from unknownbrackets/more-dcache

Do more cache invalidation, fix return values