| 1 |
#ifndef AWS_COMMON_LRU_CACHE_H |
| 2 |
#define AWS_COMMON_LRU_CACHE_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include <aws/common/cache.h> |
| 9 |
|
| 10 |
AWS_PUSH_SANE_WARNING_LEVEL |
| 11 |
AWS_EXTERN_C_BEGIN |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
AWS_COMMON_API |
| 20 |
struct aws_cache *aws_cache_new_lru( |
| 21 |
struct aws_allocator *allocator, |
| 22 |
aws_hash_fn *hash_fn, |
| 23 |
aws_hash_callback_eq_fn *equals_fn, |
| 24 |
aws_hash_callback_destroy_fn *destroy_key_fn, |
| 25 |
aws_hash_callback_destroy_fn *destroy_value_fn, |
| 26 |
size_t max_items); |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
AWS_COMMON_API |
| 33 |
void *aws_lru_cache_use_lru_element(struct aws_cache *cache); |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
AWS_COMMON_API |
| 39 |
void *aws_lru_cache_get_mru_element(const struct aws_cache *cache); |
| 40 |
|
| 41 |
AWS_EXTERN_C_END |
| 42 |
AWS_POP_SANE_WARNING_LEVEL |
| 43 |
|
| 44 |
#endif |