求助,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"
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 4

怎么没有人碰到过吗?

3年前 评论

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

3年前 评论

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

3年前 评论

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

3年前 评论