Skip to content

Disable first-level cache for read-only transactions #216

@nvamelichev

Description

@nvamelichev

In YOJ 2.x, as an opt-in; and in YOJ 3.x, make this an opt-out.

Rationale: First-level cache being enabled in read-only mode is a mistake, or at least highly unexpected by most users. Unfortunately, this behavior is relied upon by some prominent YOJ users. The cache is already disabled in scan mode, because that was introduced later than the read-only mode and had no backwards compatibility concerns to deal with.

Question: Where to add the new API to explicitly say that you don't need the first-level cache? The TxManager already has the noFirstLevelCache() method, but calling it will disable the cache everywhere, not just in read-only mose.

Metadata

Metadata

Assignees

Labels

breakingPotentially breaking change in API or behaviorimprovementSmall or at least self-contained improvement of an existing feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions