Skip to content

Add configurable Grafast cache limits - #1746

Draft
Zetazzz wants to merge 1 commit into
mainfrom
agent/grafast-cache-limits
Draft

Add configurable Grafast cache limits#1746
Zetazzz wants to merge 1 commit into
mainfrom
agent/grafast-cache-limits

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements planning item F06 on main, where the reusable performance harness is already available.

  • adds explicit per-schema limits for Grafast query, operation, and operation-plan caches
  • accepts limits from pgpm.json/runtime options or three environment variables
  • validates every merged configuration source as a safe integer of at least 2
  • installs one schema plugin only when at least one limit is configured
  • preserves Grafast upstream defaults and current behavior when omitted
  • keeps this PR independent of F03 preset-composition work and all scoped-introspection/retirement changes

Configuration

{
  "graphile": {
    "grafastCache": {
      "queryCacheMaxLength": 512,
      "operationsCacheMaxLength": 256,
      "operationOperationPlansCacheMaxLength": 32
    }
  }
}

Equivalent environment variables:

  • GRAPHILE_QUERY_CACHE_MAX_LENGTH
  • GRAPHILE_OPERATIONS_CACHE_MAX_LENGTH
  • GRAPHILE_OPERATION_PLANS_CACHE_MAX_LENGTH

Validation

Rebased onto main@7d28f718c049. Verified final head 67f47e488de11fe6a21d2c4327b2ceb3ef780983:

Local verification: 5 affected or restored packages built successfully; cache configuration and plugin tests passed 2 suites / 25 tests, including eviction behavior.

Refs constructive-io/constructive-planning#1693.

@Zetazzz
Zetazzz force-pushed the test/performance-harness-core branch from 45cbb07 to 658736e Compare September 6, 2026 01:51
@Zetazzz
Zetazzz force-pushed the agent/grafast-cache-limits branch from 84977d5 to 8d773ed Compare September 6, 2026 01:51
@Zetazzz
Zetazzz force-pushed the test/performance-harness-core branch from 658736e to f7c63ec Compare September 7, 2026 03:22
@Zetazzz
Zetazzz force-pushed the agent/grafast-cache-limits branch from 8d773ed to 67f47e4 Compare September 9, 2026 01:43
@Zetazzz
Zetazzz changed the base branch from test/performance-harness-core to main September 9, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant