I'm using Symfony framework with Redis as cache. My controller fetches info from third-party API, creates php objects and places them to a Twig template. Is it good decision to cache rendered HTML in Redis? Maybe better to serialize objects and save them? In last case server will spend time to unserializing and templating but I feel there is something not-so-pretty in first case.
Thank you.
For that use a reverse proxy cache like Varnish that is designed for this kind of purposes. It has powerful methods for cache invalidation that are the main cause of headaches when dealing with caches.
If you use redis each request still impacts your application causing the whole DI container to be loaded, until your events (or whatever method you use) process the request, checks if it is in redis and if it's still valid and deliver it.
With a reverse proxy cache if your app only is impacted when fresh content is needed.
As has been said in comments a system like redis can be some kind of "intermediate" cache in which you can store Api results or internal heavy and not so "changing" calculations to improve the overall performance.