Closed roelbondoc closed 3 months ago
I think this is the wrong solution to the problem of cache key payloads being very large, and removes the potential for querying insights data for things like cache key prefixes.
Since there are raw objects in payload[:key]
, it seems the payload[:key]
contains the raw arguments for the computed cache key, not the actual cache key that gets sent to the cache store.
It's very normal rails practice to include an object in your cache key, so payload[:key]
might be an object, but I think that's not what you want to report in insights, and also that's not what gets sent to the cache.
I think if you modified this to transform payload[:key]
into the string that will get sent to the cache via ActiveSupport::Cache.expand_cache_key(payload[:key])
or similar, you will retain the valuable cache key in insights, and have a much smaller payload.
Thanks @jaredmoody, that makes sense. I'll look into putting up a PR for that.
Before submitting a pull request, please make sure the following is done:
rake spec
in the repository root.