/* SPDX-License-Identifier: LGPL-2.1-only */ /* Copyright (C) 2020 Gediminas Jakutis */ #ifndef ALGOS_CACHE_H_INCLUDED #define ALGOS_CACHE_H_INCLUDED #include #include "defs.h" int cache_create(struct stream * const restrict in, const struct settings * const restrict s); int cache_populate(struct stream * const restrict in); int cache_flush(struct stream * const in); int cache_destroy(struct stream * const in); int cache_transfer(struct stream * const from, struct stream * const to); int cached_get_array(struct stream * const in, ssize_t idx, struct entry_l * const data); int cached_get_list(struct stream * const restrict in, ssize_t idx, struct entry_l * const data); int cached_put_array(struct stream * const in, ssize_t idx, const struct entry_l * const data); int cached_put_list(struct stream * const restrict in, ssize_t idx, const struct entry_l * const data); #endif /* ALGOS_CACHE_H_INCLUDED */