遇到了让我很郁闷的事:之前一直跑的程序,用的 laravel 框架,用了缓存 cache。有段逻辑会生成一个 2 分钟的缓存,忽然发现缓存失效了,忙一晚上找原因,后来发现把缓存有效时间参数从 2 改成 120,居然成功恢复 2 分钟的缓存了……最近做过的变更是,用 composer 把 laravel/framework 升级到 v5.5.48 ,给 php-fpm 开了 opcache 和修改了 php 的可用内存,没其他变更了。
想不明白问题在哪。
1
also24 2020 年 3 月 4 日 |
2
pota 2020 年 3 月 4 日 |
4
also24 2020 年 3 月 4 日
@pota #2
奇怪的是,楼主说自己在用的是 v5.5.48 但是我翻官方的更新记录只翻到 v5.5.46 https://github.com/laravel/framework/blob/5.5/CHANGELOG-5.5.md |
5
vovov 2020 年 3 月 4 日 via Android
版本问题没跑
|
6
pota 2020 年 3 月 4 日
@win7pro #4 很奇怪 https://packagist.org/packages/laravel/framework#v5.5.48 这里确实有 5.5.48 的 tag 但是我也没翻到这个的 changelog
|
7
also24 2020 年 3 月 4 日
仔细看了一下 Commit Log,感觉锅可能在 Laravel 身上:
https://i.loli.net/2020/03/04/roSgLR3uKyEv6sh.png 在这个 PR 里,我们可以看到开发者是有意识到可能的后果的 https://github.com/laravel/framework/pull/29610 > driesvints: I'm not sure if it's wanted to make these breaking changes on a minor release? People updating their apps will see their TTL being configured wrong. Besides that supports for 5.5 ends this month. >GrahamCampbell: These changes are not a breaking, but a bug fix (well, every bug fix is breaking technically :P). >GrahamCampbell: I don't anciptiate this change will affect any other 5.5 users because 99.999% of people will be calling put and putMany. Only those who are using it as a PSR-16 instance will be using set and setMultiple, and we need to behaves correctly for those users surely? |
9
pota 2020 年 3 月 4 日
@pota 找到了 https://github.com/laravel/framework/commit/4c6c24f5ea4c466e505d53048224a282dba7867c 按楼上说的 应该就是此次 PR 合并导致的修改 官方居然没有进行说明
|
11
also24 2020 年 3 月 4 日 |
12
skymei 2020 年 3 月 5 日
laravel 的版本最好别随意升级,版本之间的差异比较多,很容易采坑。
|
14
dvaknheo 2020 年 3 月 5 日
都 laravel 7 了,还用 Laravel 5.5,不怕已知安全漏洞么?
|
15
lijialong1313 2020 年 3 月 7 日
@dvaknheo 5.5 好像是 lts 版本来的,2022 年还是 2021 年过期。我就没想到居然改了这个东西还不写 changelog
|
16
puzzle9 2021 年 2 月 19 日
其实 有一个解决方案 不过就是 emmmmm
采用 now()->addMinutes(6) |