implementing DStab cache