Fix bug if cache file is empty.
Add views support to empty database.