Skip to content
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

[Cache] remove implicit dependency on symfony/filesystem #33922

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

/cc @andrerom for review

@@ -137,11 +129,6 @@ protected function doInvalidate(array $tagIds): bool
return true;
Copy link
Member Author

@nicolas-grekas nicolas-grekas Oct 9, 2019

Choose a reason for hiding this comment

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

doInvalidate leaks inodes by not clearing the directory of invalidated tags, but this cannot be fixed with the current storage layout. We'd need a file listing item files instead of symlinks, as suggested in #33924. /cc @andrerom makes sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

File representing cache tag where you append cache keys?

Could do that, but then:

  • more work (with race) to clean up relationship when tags are removed from an item _(unless we continue to view that as eventually consistent)
  • can it hit file limits if it only appends and never cares if cache key is already there?
  • on invalidation probably need to rename like with redis to be able to iterate and clear without race possibilities

So can work, but might present its own set of challenges.
Would it be better than replacing symlinks with just simple files that contain the cache key as value?

Copy link
Member Author

Choose a reason for hiding this comment

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

(continued in #33924 (comment))

nicolas-grekas added a commit that referenced this pull request Oct 9, 2019
…nicolas-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] remove implicit dependency on symfony/filesystem

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

/cc @andrerom for review

Commits
-------

85f27f2 [Cache] remove implicit dependency on symfony/filesystem
@nicolas-grekas nicolas-grekas merged commit 85f27f2 into symfony:4.3 Oct 9, 2019
@nicolas-grekas nicolas-grekas deleted the cache-no-fs branch October 9, 2019 14:54
@fabpot fabpot mentioned this pull request Nov 1, 2019
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.

None yet

4 participants