adding cache length constraints