If compress_dynamo_documents flag set to true, permanent environment cache (the one configured with CACHE_ENVIRONMENT_DOCUMENT_ settings) gets broken.
A correct approach would be to use a mapper with a different destination type for the cache — flagsmith_schemas.api.V1EnvironmentDocumentResponse seems appropriate, and it's already being used for the cache consuming view's API docs.
Related to #6654.
We should abstain from enabling compress_dynamo_documents for self-hosted defaults before this issue is solved.