Home  >  Article  >  PHP Framework  >  Analyze the usage issues of Thinkphp5 composite cache

Analyze the usage issues of Thinkphp5 composite cache

藏色散人
藏色散人forward
2021-09-26 15:40:171888browse

The followingthinkphp frameworktutorial column will introduce to you the use of tp5 composite cache. I hope it will be helpful to friends in need!

Configuration as shown:
Analyze the usage issues of Thinkphp5 composite cache

Business code:

Analyze the usage issues of Thinkphp5 composite cache

The cache has never been able to obtain data, and it has always been queried from the database.

I changed
Cache::store('redis')->set('table_members_'.$tableId,$list); to
Cache::set('table_members_'. $tableId,$list); the execution will be normal.

Explains that the default cache is executable.

I modified the configuration as follows:

Analyze the usage issues of Thinkphp5 composite cache

The business is also normal, but it is inconsistent with the instructions in the official website document

Analyze the usage issues of Thinkphp5 composite cache

Recommended: "The latest 10 thinkphp video tutorials"

The above is the detailed content of Analyze the usage issues of Thinkphp5 composite cache. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete