moved cache to sqlite, work in progress