improved cache and index