making the invalidate cache interval parametrized