Redis Caching for Requests to a Database Service

I know there are a couple legacy topics regarding caching, but most seem to regard previous versions of DreamFactory.

I’m running 2.4.1 and trying to setup caching for requests made to a Postgres database service. I have a Redis caching service created and have confirmed (by making some API requests) that both the Redis and Postgres services are operational.

I was expecting DreamFactory to work like this:

  1. Request is made to the API for the Postgres database service.
  2. DreamFactory retrieves results and caches them in the Redis service using the keys from the request.
  3. DreamFactory returns result.
  4. On subsequent requests, DreamFactory will return the cached result from Redis until the default TTL expires OR a server-side script invalidates the response.

Perhaps I was assuming too much about the caching services and this needs to be setup manually via server-side scripting? Seems like this issue indicates that, but want to double-check before I start implementing custom caching logic.

Also would be curious if there is code in-development for this type of “automatic” caching feature that we could contribute to…could see that being a much better long-term solution for us.