completed DStab cache implementation