mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add cache for some LS requests (#893)
* Cache runSmcMethod queries to LS * Drop duplicate sendMessage * Drop sendMessage cache once a minute --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
12c1b1a2e6
commit
79c48ebbba
7 changed files with 185 additions and 23 deletions
|
@ -19,16 +19,19 @@
|
|||
#pragma once
|
||||
|
||||
#include "td/actor/actor.h"
|
||||
#include "td/utils/buffer.h"
|
||||
#include "common/bitstring.h"
|
||||
|
||||
namespace ton {
|
||||
|
||||
namespace validator {
|
||||
namespace ton::validator {
|
||||
|
||||
class LiteServerCache : public td::actor::Actor {
|
||||
public:
|
||||
virtual ~LiteServerCache() = default;
|
||||
~LiteServerCache() override = default;
|
||||
|
||||
virtual void lookup(td::Bits256 key, td::Promise<td::BufferSlice> promise) = 0;
|
||||
virtual void update(td::Bits256 key, td::BufferSlice value) = 0;
|
||||
|
||||
virtual void process_send_message(td::Bits256 key, td::Promise<td::Unit> promise) = 0;
|
||||
};
|
||||
|
||||
} // namespace validator
|
||||
|
||||
} // namespace ton
|
||||
} // namespace ton::validator
|
Loading…
Add table
Add a link
Reference in a new issue