RTSP playback buffer for live stream

I’m looking for a way to create a playback buffer for a live RTSP stream. I want to be able to seek into and playback the last 15 minutes of recording from the stream. I have been having trouble finding much information on this–my current idea would be to create a custom gst RTSP server that re-streams the original RTSP source through a leaky queue, then add custom handling to seek within the queue on clients request. Any suggestions on an easier way to solve this?