Support memory cache and discache for java and android platform