WIP: add cache invalidation support