mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
ircd:Ⓜ️:media::block: Add prefetch() to interface.
This commit is contained in:
parent
6102c0a8b2
commit
e267b5232d
2 changed files with 8 additions and 0 deletions
|
@ -48,6 +48,7 @@ namespace ircd::m::media::block
|
|||
{
|
||||
using closure = std::function<void (const const_buffer &)>;
|
||||
|
||||
bool prefetch(const string_view &hash);
|
||||
const_buffer get(const mutable_buffer &out, const string_view &hash);
|
||||
|
||||
void set(const string_view &hash, const const_buffer &block);
|
||||
|
|
|
@ -627,6 +627,13 @@ ircd::m::media::block::get(const mutable_buffer &out,
|
|||
return db::read(blocks, b58hash, out);
|
||||
}
|
||||
|
||||
bool
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::media::block::prefetch(const string_view &b58hash)
|
||||
{
|
||||
return db::prefetch(blocks, b58hash);
|
||||
}
|
||||
|
||||
//
|
||||
// media::mxc
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue