@mikael
yep, I tried both ways. The strange thing is, I cannot find the cache directory in either cases. Answers from stackoverflow tell that the cache directory is located in “Library/Cache” but no directory or file was there. I did some searches using stash however cannot find anything related. So it is possible that cache is not created from the very beginning.
My code structure is like:
NSURLCache = ObjCClass('NSURLCache')
shared_cache = NSURLCache.alloc().initWithMemoryCapacity_diskCapacity_diskPath_(100*1024*1024,1200*1024*1024,'kc')
NSURLCache.setSharedURLCache_(shared_cache)
w, h = ui.get_screen_size()
v = ui.View(background_color='black')
wv =ui.WebView()
......
Missing anything?