Commit 8c02677
committed
bug symfony#52105 [Cache] Remove temporary cache item file on
This PR was squashed before being merged into the 5.4 branch.
Discussion
----------
[Cache] Remove temporary cache item file on `rename()` failure
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix symfony#52092
| License | MIT
The filesystem cache adapter creates a temporary file to store cache item data, then moves it to its target path using `rename()` function. If rename fails, for instance target path is not writable, the temporary file will remains.
To prevent filesystem saturation, the temporary files should be deleted if this operation is not done by the `rename()` function itself.
Commits
-------
af15423 [Cache] Remove temporary cache item file on `rename()` failurerename() failure (cedric-anne)File tree
1 file changed
+10
-1
lines changed- src/Symfony/Component/Cache/Traits
1 file changed
+10
-1
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
| |||
0 commit comments