top-think / top-think/think-orm

think-orm2.0版本配置开启字段缓存存放路径参数schema_cache_path无效

Open
#449 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
437
Forks
188
PR merge metrics
No merged PRs in 30d

Description

在webman项目里面使用think-orm,开启字段缓存
thinkorm.php里面的代码:
[
...
'fields_cache' => true,
'schema_cache_path' => runtime_path() . '/thinkorm-cache/',
]
缓存使用think-cache,使用文件缓存
thinkcache.php里面的代码:
[
'default' => 'file',
'stores' => [
'file' => [
'type' => 'File',
// 缓存保存目录
'path' => runtime_path() . '/cache/',
...
],
],
]
结果字段缓存文件存放在runtime_path() . '/cache/'而不是runtime_path() . '/thinkorm-cache/',搜索代码发现根本没有地方使用schema_cache_path,是只有在thinkphp上才会用到吗?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the thinkorm.php and thinkcache.php configurations shown in the report, then trace how field caching selects its store and path in a webman application. Compare the configured schema_cache_path with the observed cache location; done means the parameter is honored or its unsupported use is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.