Skip to content

[Config] Fix dumped files invalidation by OPCache #24421

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

Merged
merged 1 commit into from
Oct 4, 2017

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Oct 4, 2017

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

While demoing Flex, I've noticed that container invalidation takes a few seconds on my setup.
I've debugged that down to OPcache, which serves the legacy container while it's been overridden.
Let's invalidate the file explicitly when it changes.

@@ -149,6 +149,10 @@ public function write($content, array $metadata = null)
// discard chmod failure (some filesystem may not support it)
}
}

if (function_exists('opcache_invalidate') && ini_get('opcache.enable')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\function_exists()? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks robbot ;)

@fabpot
Copy link
Member

fabpot commented Oct 4, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit b1290da into symfony:2.7 Oct 4, 2017
fabpot added a commit that referenced this pull request Oct 4, 2017
…-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Fix dumped files invalidation by OPCache

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

While demoing Flex, I've noticed that container invalidation takes a few seconds on my setup.
I've debugged that down to OPcache, which serves the legacy container while it's been overridden.
Let's invalidate the file explicitly when it changes.

Commits
-------

b1290da [Config] Fix dumped files invalidation by OPCache
@nicolas-grekas nicolas-grekas deleted the opcache-reset branch October 5, 2017 16:37
This was referenced Oct 5, 2017
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.

6 participants