From ccf68cea10600814bb0b89477275e29d2637dacd Mon Sep 17 00:00:00 2001 From: gongguilin Date: Wed, 30 Apr 2025 09:02:06 +0800 Subject: [PATCH] =?UTF-8?q?cacheable=E5=8D=95=E4=BD=8Ds=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BAms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gongguilin --- .../codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp | 2 +- .../keyword_cacheable_test_001/target_cpp/foo_proxy.h.txt | 6 +++--- .../keyword_cacheable_test_002/target_cpp/foo_proxy.h.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp b/idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp index 1c52fdc..82422df 100644 --- a/idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp +++ b/idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp @@ -110,7 +110,7 @@ void SaCppClientProxyCodeEmitter::EmitInterfaceProxyAddCacheApi(StringBuilder &s int32_t cacheableTime = method->GetCacheableTime(); if (cacheableTime != 0) { sb.Append(prefix).Append("ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(),\n") - .Append(prefix + TAB).AppendFormat("static_cast(%sIpcCode::COMMAND_%s), %d000);\n", + .Append(prefix + TAB).AppendFormat("static_cast(%sIpcCode::COMMAND_%s), %d);\n", interface_->GetName().c_str(), ConstantName(method->GetName() + overloadname).c_str(), cacheableTime); } else { sb.Append(prefix).Append("ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(),\n") diff --git a/test/sa_test/keyword_cacheable_test_001/target_cpp/foo_proxy.h.txt b/test/sa_test/keyword_cacheable_test_001/target_cpp/foo_proxy.h.txt index 6d00a14..f903807 100644 --- a/test/sa_test/keyword_cacheable_test_001/target_cpp/foo_proxy.h.txt +++ b/test/sa_test/keyword_cacheable_test_001/target_cpp/foo_proxy.h.txt @@ -30,15 +30,15 @@ public: : IRemoteProxy(remote) { ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), - static_cast(IFooIpcCode::COMMAND_TEST001), 100000); + static_cast(IFooIpcCode::COMMAND_TEST001), 100); ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), static_cast(IFooIpcCode::COMMAND_TEST002), 0); ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), static_cast(IFooIpcCode::COMMAND_TEST003), 0); ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), - static_cast(IFooIpcCode::COMMAND_TEST004), 200000); + static_cast(IFooIpcCode::COMMAND_TEST004), 200); ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), - static_cast(IFooIpcCode::COMMAND_TEST005), 2147483647000); + static_cast(IFooIpcCode::COMMAND_TEST005), 2147483647); if (remote_) { if (!remote->IsProxyObject()) { diff --git a/test/sa_test/keyword_cacheable_test_002/target_cpp/foo_proxy.h.txt b/test/sa_test/keyword_cacheable_test_002/target_cpp/foo_proxy.h.txt index 367df61..90287ee 100644 --- a/test/sa_test/keyword_cacheable_test_002/target_cpp/foo_proxy.h.txt +++ b/test/sa_test/keyword_cacheable_test_002/target_cpp/foo_proxy.h.txt @@ -32,7 +32,7 @@ public: ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), static_cast(IFooIpcCode::COMMAND_TEST005), 0); ApiCacheManager::GetInstance().AddCacheApi(GetDescriptor(), - static_cast(IFooIpcCode::COMMAND_TEST005_IN_INT_OUT_INT), 2000); + static_cast(IFooIpcCode::COMMAND_TEST005_IN_INT_OUT_INT), 2); if (remote_) { if (!remote->IsProxyObject()) { -- Gitee