mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-01 19:27:39 +08:00
Don't generate rpc proxy again when open scan cacheable
. (#5005)
This commit is contained in:
parent
bbd134cacd
commit
035b830cbe
@ -3,6 +3,7 @@
|
||||
## Optimized
|
||||
|
||||
- [#5002](https://github.com/hyperf/hyperf/pull/5002) Optimized the generation rules of rpc proxy class suffix, which can be customized more easily.
|
||||
- [#5005](https://github.com/hyperf/hyperf/pull/5005) Don't generate rpc proxy again when open `scan cacheable`.
|
||||
|
||||
# v2.2.34 - 2022-07-21
|
||||
|
||||
|
@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace Hyperf\RpcClient;
|
||||
|
||||
use Hyperf\Di\Annotation\ScanConfig;
|
||||
use Hyperf\RpcClient\Proxy\Ast;
|
||||
use Hyperf\RpcClient\Proxy\CodeLoader;
|
||||
use Hyperf\Utils\Coroutine\Locker;
|
||||
@ -77,6 +78,10 @@ class ProxyFactory
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ScanConfig::instance('')->isCacheable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$time = $this->filesystem->lastModified(
|
||||
$this->codeLoader->getPathByClassName($interface)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user