added support for offline cache db