Skip to content

Improve GraphQL caching for large queries #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

gajdusek
Copy link
Contributor

Pimcore limits caching to a maximum of 50 items per request. For large GraphQL queries, this limit can easily be exceeded because every object loaded during query resolution is added to the cache queue with priority 0. When the queue is truncated, only the top 50 items (by priority) are retained.

This commit increases the priority of the final GraphQL query result, ensuring this is more likely to be cached despite the 50-item limit.

Pimcore limits caching to a maximum of 50 items per request. For large
GraphQL queries, this limit can easily be exceeded because every object
loaded during query resolution is added to the cache queue with priority 0.
When the queue is truncated, only the top 50 items (by priority) are
retained.

This commit increases the priority of the final GraphQL query result,
ensuring this is more likely to be cached despite the 50-item limit.
@herbertroth herbertroth changed the base branch from 1.x to 2.x April 7, 2025 13:09
@robertSt7 robertSt7 added this to the 2.0.0 milestone Apr 10, 2025
@robertSt7
Copy link
Contributor

@gajdusek Could you please resolve the conflicts? Thanks

@fashxp fashxp modified the milestones: 2.0.0, 2.1.0 Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants