add basic cache pruning ability