The `CachedQuery` doesn't have access to the `documentClass` property from the `Repository` which makes this difficult.