Caching headers on server

When you access rest api, and it tells the server to cache the response, does it actually use up ram to do it?