国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

webman里使用thinphp的cache出現(xiàn)問題

zhuyujin001

問題描述

這里寫描述
按照手冊(cè) composer require -W webman/think-cache安裝cache后
在app的loginController.php里

use think\facade\Cache;
Cache::has('val'); //隨便設(shè)置一個(gè)未有的key 打印都是true
Cache::remember('vals',10);
Cache::get('vals');//值是null

問題:隨便設(shè)置一個(gè)未有的key Cache::has('dss')打印都是true
Cache::remember('vals',10);
Cache::get('vals');打印的值都是null
怎么回事啊?
環(huán)境php7.4
config/thinkcache.php

<?php
return [
    'default' => 'file',
    'stores' => [
        'file' => [
            'type' => 'File',
            // 緩存保存目錄
            'path' => runtime_path() . '/cache/',
            // 緩存前綴
            'prefix' => '',
            // 緩存有效期 0表示永久緩存
            'expire' => 0,
        ],
        'redis' => [
            'type' => 'redis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'prefix' => '',
            'expire' => 0,
        ],
    ],
];
1079 2 0
2個(gè)回答

walkor 打賞

webman/think-cache 實(shí)際上就是安裝的tp官方的think-cache,這是他們代碼庫,https://github.com/top-think/think-cache
是不是你哪里弄錯(cuò)了,感覺他們不會(huì)有這個(gè)么明顯的bug

  • 暫無評(píng)論
zhuyujin001


全新安裝了webman框架,然后按照文檔composer require -W webman/think-cache
確實(shí)有問題*(如圖)
但是thinkphp框架就事正常的

  • 暫無評(píng)論
年代過于久遠(yuǎn),無法發(fā)表回答
??