IO blocking optimization, added sqlite caching