cache
cache copied to clipboard
refactor cacheWriter to ensure that cache write is atomic
This PR refactor cacheWriter that to write cache when handler finish instead of immediately write cache in Write() Function.
There are two benefits:
- promote the write performance: once cache write should be better than multiple read and write
- CachePage will become thread safe.