Skip to content

perf(symfony): remove redundant property info cache files - #8846

Closed
nicolas-grekas wants to merge 1 commit into
api-platform:mainfrom
nicolas-grekas:perf/remove-property-info-cache-files
Closed

nicolas-grekas wants to merge 1 commit into
api-platform:mainfrom
nicolas-grekas:perf/remove-property-info-cache-files

Conversation

@nicolas-grekas

@nicolas-grekas nicolas-grekas commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? main
Tickets -
License MIT
Doc PR n/a

CachedPropertyMetadataFactory and CachedPropertyNameCollectionFactory still use the persistent api_platform.cache.metadata.property pool (cache.system). A hit there skips PropertyInfo. This PR moves only the inner PropertyInfo cache to memory, keeping repeated calls fast within a PHP process.

A fresh docs test wrote 41 system cache files instead of 228, with 187 PropertyInfo files gone. Direct PropertyInfo calls in a new process can be slower: 180 calls took about 140 ms in this fixture, versus 18 ms with files. ApiPlatformExtensionTest::testPropertyInfoUsesInMemoryCache() checks the cache configuration.

@nicolas-grekas
nicolas-grekas force-pushed the perf/remove-property-info-cache-files branch from d93704e to 0a9f203 Compare November 13, 2026 13:11
@nicolas-grekas
nicolas-grekas deleted the perf/remove-property-info-cache-files branch November 13, 2026 13:51
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