implemented inmemory cache

implemented deleteDirectory