Skip to content

Backend/Enh/Removed-Return-Type-From-RedisCache#1388

Merged
piyushKumar-1 merged 2 commits into
mainfrom
backend/enh/Removed-Return-Type-From-RedisCache
Jul 1, 2026
Merged

Backend/Enh/Removed-Return-Type-From-RedisCache#1388
piyushKumar-1 merged 2 commits into
mainfrom
backend/enh/Removed-Return-Type-From-RedisCache

Conversation

@H-C-21

@H-C-21 H-C-21 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Simplified cache key handling so cached data and cache cleanup now use a consistent bucket key format.
    • Improved cache deletion behavior to work without relying on stored value types, making cache removal more reliable and flexible.
  • Refactor
    • Removed unnecessary type-related requirements from cache helpers, streamlining cache operations.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0daf5366-c66b-4036-9c94-1c588ec9b086

📥 Commits

Reviewing files that changed from the base of the PR and between 412a722 and da84d92.

📒 Files selected for processing (1)
  • lib/mobility-core/src/Kernel/Storage/Hedis/Cache.hs

Walkthrough

The Redis cache key construction in mobility-core's Cache module is changed to remove type-based key indexing. buildRedisHashKey no longer requires Typeable and returns the prefix directly. Dependent functions withRedisCache, delRedisCache, and delRedisCacheBucket drop their Typeable b constraints accordingly, and the AllowAmbiguousTypes pragma is removed.

Changes

Type-free Redis cache keys

Layer / File(s) Summary
Simplify hash key construction
lib/mobility-core/src/Kernel/Storage/Hedis/Cache.hs
buildRedisHashKey changes from a Typeable-based function appending type names to a plain Text -> Text function returning the prefix; AllowAmbiguousTypes pragma and Typeable/typeRep imports are removed.
Update cache read/write path
lib/mobility-core/src/Kernel/Storage/Hedis/Cache.hs
withRedisCache drops its Typeable b constraint and computes hashKey via buildRedisHashKey hashPrefix directly instead of using a type application.
Update cache deletion path
lib/mobility-core/src/Kernel/Storage/Hedis/Cache.hs
delRedisCache and delRedisCacheBucket drop their forall b/Typeable b quantification and use buildRedisHashKey hashPrefix directly to compute deletion targets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

A rabbit hops through Redis dens,
No more type-names, just plain key ends.
Typeable packed up and left the show,
Hash keys now lighter, simpler to know.
Thump thump — cache cleaned, watch it flow! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is directly related to the main change: removing type-based Redis cache behavior and constraints.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backend/enh/Removed-Return-Type-From-RedisCache

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.

@piyushKumar-1 piyushKumar-1 merged commit 3afbf41 into main Jul 1, 2026
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.

4 participants