求助,Laravel 使用 memcached的奇怪问题,能put 不能get?

laravel 8本地测试,选择file缓存,都没问题,后来按文档选择了 memcached作缓存,没有任何报错,看起来好象工作正常:如果永久缓存,能正常get;如果设了过期时间,就 get null; 请问如何解决?

>>> Cache::getMemcached()->getStats()
=> [
     "127.0.0.1:11211" => [
       "pid" => 5900,
       "uptime" => 3055923696.0,
       "time" => 390119688,
       "version" => "1.4.4-14-g9c660c0",
       "pointer_size" => 64,
       "curr_connections" => 12,
       "total_connections" => 224,
       "connection_structures" => 16,
       "cmd_get" => 57797,
       "cmd_set" => 16075,
       "cmd_flush" => 1,
       "get_hits" => 3457,
       "get_misses" => 54340,
       "delete_misses" => 0,
       "delete_hits" => 2,
       "incr_misses" => 0,
       "incr_hits" => 0,
       "decr_misses" => 0,
       "decr_hits" => 0,
       "cas_misses" => 0,
       "cas_hits" => 0,
       "cas_badval" => 0,
       "auth_cmds" => 0,
       "auth_errors" => 0,
       "bytes_read" => 15010440,
       "bytes_written" => 62954825,
       "limit_maxbytes" => 536870912,
       "accepting_conns" => 1,
       "listen_disabled_num" => 0,
       "threads" => 4,
       "conn_yields" => 0,
       "bytes" => 991221,
       "curr_items" => 1538,
       "total_items" => 15238,
       "evictions" => 0,
     ],
   ]
>>> Cache::get('test')
=> null
>>> Cache::put('test', 'adsfasdfasdf', 30000)
=> true
>>> Cache::get('test')
=> null
>>> Cache::put('test', 'adsfasdfasdf')
=> true
>>> Cache::get('test')
=> "adsfasdfasdf"
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
讨论数量: 4

怎么没有人碰到过吗?

2年前 评论

有没有可能是你本地的内存不足导致的

2年前 评论

@tu6ge-php 不太像,任务管理器看 内存空闲还有1G多。

2年前 评论

系统分配给 php 的内存是多少,改大一些看看

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!