Comments (6)
如果这个文件变更不是很频繁的话,我建议你们可以使用yaconf, 不会出现不一致的情况,Yac是有一定概率出错的。
from yac.
鸟哥,Yac 写入或者读出缓存的时候,不是有 crc 的校验么,为什么还会发生缓存不一致的问题呢?
在文章:https://www.laruence.com/2013/03/18/2846.html 里找到了这么一句话
可见, 最严重的错误, 就是A和B的缓存都失效, 但是Yac不会把错误数据返回给用户, 当下一次来查询Cache的时候, 因为存在crc校验, 所以都miss.
from yac.
crc碰撞 了解下,所以Yac还是会一定概率出错的。
from yac.
crc碰撞 了解下,所以Yac还是会一定概率出错的。
为什么一个bug会被这么理所当然的解释,而不是尝试去修复.
所以结论就是
想要上生产环境,就必须容忍这个bug,或者换成 yaconf
from yac.
实际上,我已经使用了APCu
代替了Yac
和Yaconf
。
Yac
的毛病,正如你发现的 1个BUG 还当成理所当然 当然是不对的,可用在不那么重要的数据上。
Yaconf
的毛病,正如我提到的:laruence/yaconf#67 BUG提了1年了,还没修复,所以 我无法继续等待了。
而我发现APCu是PHP官网出品,功能不仅仅完美替代了Yac
和Yaconf
,而且其他方面都更加强大~
比如我的项目HookPHP,使用了APCu
和PHP8.1的预加载技术,你可以参考下:
- 业务配置字典文件支持多及目录 https://github.com/letwang/HookPHP/tree/master/app/admin/config
- 配置PHP服务启动时自动加载业务配置 https://github.com/letwang/HookPHP/blob/master/Dockerfile#L460
- 把配置数据预加载到服务器常驻内存 https://github.com/letwang/HookPHP/blob/master/preload.php
- APCu缓存管理面板 https://github.com/letwang/HookPHP/blob/master/apc.php
from yac.
实际上,我已经使用了
APCu
代替了Yac
和Yaconf
。Yac
的毛病,正如你发现的 1个BUG 还当成理所当然 当然是不对的,可用在不那么重要的数据上。Yaconf
的毛病,正如我提到的:laruence/yaconf#67 BUG提了1年了,还没修复,所以 我无法继续等待了。 而我发现APCu是PHP官网出品,功能不仅仅完美替代了Yac
和Yaconf
,而且其他方面都更加强大~比如我的项目HookPHP,使用了
APCu
和PHP8.1的预加载技术,你可以参考下:
- 业务配置字典文件支持多及目录 https://github.com/letwang/HookPHP/tree/master/app/admin/config
- 配置PHP服务启动时自动加载业务配置 https://github.com/letwang/HookPHP/blob/master/Dockerfile#L460
- 把配置数据预加载到服务器常驻内存 https://github.com/letwang/HookPHP/blob/master/preload.php
- APCu缓存管理面板 https://github.com/letwang/HookPHP/blob/master/apc.php
感谢回复
from yac.
Related Issues (20)
- 请问yac的info其中几个字段的含义 HOT 1
- 【建议】get新增支持获取多维数组的某一项 HOT 1
- [2.1.0] Broken build on 32-bit HOT 2
- Serializer choice at runtime HOT 2
- Cli模式下,获取不到缓存,每次执行都在写缓存,是需要特殊配置吗? HOT 2
- 为什么ipcs -m查不到yac的共享内存,但是能访问到key,那要怎么查看呢 HOT 2
- How can I get the actual value memory usage? HOT 1
- 亲测是支持PHP8的,充分证明当年代码质量和写时考虑周全。 HOT 1
- 文档中的常量名称错误 HOT 2
- 请问通过哪个参数可以控制给yac分配的最大内存? HOT 1
- PHP8.1.1+yac-2.3.1 开启 msgpack压缩报错 HOT 3
- Use in different processes HOT 5
- ab test yac poor performance than only use redis HOT 2
- How does the cas work? (compare and swap)
- 新增incr功能
- yac 读取出来数据不正确 HOT 1
- Windows DLL available to download
- php 7.3.4 make 错误 HOT 2
- closed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yac.