0
0
Fork 0
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:
Jason Volk 2019-09-17 11:35:50 -07:00
parent 6102c0a8b2
commit e267b5232d
2 changed files with 8 additions and 0 deletions

View file

@ -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);

View file

@ -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
//