Skip to content

fix: support query caching options in find - #347

Open
elpete wants to merge 1 commit into
nextfrom
issue/46
Open

fix: support query caching options in find#347
elpete wants to merge 1 commit into
nextfrom
issue/46

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #46

Issue review

Fit score: 7/10. Query caching is useful for read-heavy Quick applications, and Quick already has the right low-level extension point by forwarding query options to the CFML engine. A built-in entity/relationship identity cache would add substantial invalidation, serialization, and distributed-cache complexity, so this PR deliberately takes the smaller and safer first step.

Reasons for

  • avoids repeated database work for stable, read-heavy queries
  • uses existing CFML engine query-cache behavior and Quick query options
  • supports per-query and per-entity defaults without a new cache abstraction

Reasons against

  • query cache invalidation remains engine/application controlled
  • this does not cache live entity graphs or relationships
  • a transparent entity cache risks stale state and inconsistent behavior across distributed nodes

Implementation

  • fixes find( id, options ) so its query options reach queryExecute
  • adds a public-API integration regression for primary-key lookup options
  • documents per-query and entity-wide caching strategies and limitations

Reproduction

The regression test failed before the fix because find() called first() without forwarding its options; the captured execution options were empty.

Validation

  • focused GetSpec: 35 passed, 0 failed, 0 errors
  • full suite: 496 passed, 0 failed, 0 errors, 3 skipped
  • box run-script format
  • git diff --check
  • qb dependency: 14.0.0-beta.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant