Discussions

Ask a Question
Back to all

Caching short audio clips at the edge for a song recognition app?

Hi, we run ClipMelody, a small song finder where people paste a TikTok, Reel or Shorts link and we identify the track from a 10 to 20 second audio sample.

We extract the audio on our origin and the same viral clips get requested over and over, so we would like to cache the extracted audio segments (small m4a files, around 200 KB) at the edge for a few hours.

Is there a recommended cache key setup when the origin URL contains a hash of the source video ID as a query parameter? Should we move it into the path instead so it is not stripped by query string normalization? Any pointers to the right section of the docs would be appreciated.