Skip to content

Conversation

naaa760
Copy link

@naaa760 naaa760 commented Sep 7, 2025

fixes: #4905

Description:

This PR fixes critical issues in the Drizzle cache documentation that were preventing proper implementation of custom cache classes.

Problems Fixed:

  • Missing isTag parameter in get() and put() method signatures
  • Incorrect parameter name (key instead of hashedQuery) in put method
  • Lack of documentation explaining tag-based vs regular cache entries

Changes Made:

  • ✅ Updated method signatures to match the actual Cache interface
  • ✅ Added comprehensive explanation of isTag parameter usage
  • ✅ Provided both simple and advanced implementation examples
  • ✅ Cleaned up unnecessary formatting and comments for clarity
  • ✅ Added detailed examples showing how to handle tag-based caching properly

Impact:
Developers can now implement custom cache classes that compile correctly and properly handle both regular queries and tag-based cache entries as intended by the Drizzle cache system.

Files Changed:

  • drizzle-orm/src/cache/readme.md

Add missing isTag parameter to get() and put() method signatures
Update parameter name from key to hashedQuery in put method
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.

[DOCS]: Custom cache implementation does not compile, isTag parameter not there
1 participant