add hook for new time entries to reset the cache; add indexes to improve /contracts/all performance