Is redis caching only frontend originating queries, or cloud code originating queries too?

My goal is to minimize the number of connections to DB. I have some tables that don’t change frequently, and therefore I want to save the results of the queries to those tables to redis and serve them from cache to improve speed and decrease the load on DB.

But I’m not sure if my queries will be cached, because all of my code is on the cloud.

Do I need to make my queries from the frontend directly to get them to be saved to redis cache, or will their results be saved into redis even if the query was made from the cloud code?

I found this module by back4apps for caching queries. GitHub - back4app/parse-cache: Simple, integrated caching for Parse queries.
It was posted 5 years ago. Is it still relevant?