todo support for js insert and cache