mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
feat: do not process lua script if sha exists in cache (#1537)
This commit is contained in:
parent
7d3766a197
commit
0f8f6f387b
1 changed files with 4 additions and 0 deletions
|
@ -216,6 +216,10 @@ io::Result<string, GenericError> ScriptMgr::Insert(string_view body, Interpreter
|
|||
Interpreter::FuncSha1(body, sha_buf);
|
||||
string_view sha{sha_buf, std::strlen(sha_buf)};
|
||||
|
||||
if (interpreter->Exists(sha)) {
|
||||
return string{sha};
|
||||
}
|
||||
|
||||
string_view orig_body = body;
|
||||
|
||||
auto params_opt = DeduceParams(&body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue