Skip to content

fix: cache the entire auth object#15

Merged
sanny-io merged 3 commits intodevfrom
fix/cache-auth-object
Feb 3, 2026
Merged

fix: cache the entire auth object#15
sanny-io merged 3 commits intodevfrom
fix/cache-auth-object

Conversation

@sanny-io
Copy link
Member

@sanny-io sanny-io commented Feb 3, 2026

Summary by CodeRabbit

  • Chores
    • Version bumped to 1.0.4
    • Optimized internal cache key generation logic

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR contains version bumps from 1.0.3 to 1.0.4 across the root and two sub-packages, along with a refactoring in the cache plugin that consolidates cache key generation logic by removing conditional branching on client authentication.

Changes

Cohort / File(s) Summary
Version Bumps
package.json, packages/cache/package.json, packages/config/package.json
Updated package versions from 1.0.3 to 1.0.4 with no functional changes.
Cache Key Generation Refactor
packages/cache/src/plugin.ts
Simplified cache key generation by removing conditional logic that computed userId based on auth presence. Consolidated into a single stableHash call with { args, model, operation, auth: client.$auth }, eliminating two code paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cache-auth-object

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sanny-io sanny-io merged commit 1049f2b into dev Feb 3, 2026
1 of 2 checks passed
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