Basic implementation of caching timeline in sqlite