Hash Generator for Cache Keys
Your data never leaves your browserCaching systems use hashes to map requests to cached responses.
Example
{"endpoint":"/api/users","params":{"page":1,"sort":"name"}}Tips
- 1Hash full request signature.
- 2Sort params before hashing.
- 3MD5 sufficient for cache keys.
Frequently Asked Questions
Why hash?
Fixed-length keys from variable inputs.
MD5 or SHA-256?
MD5. Collision = cache miss, not security issue.
Param order?
Sort alphabetically first.