fix cache bug with serve() method

Signed-off-by: Thibaud Arnault <thyb@oauth.io>