Sha256: bbdbbf425475bf44655c3ff61c7c12d16304685825a8fed0b27e8fef99dc1fd9

Contents?: true

Size: 869 Bytes

Versions: 8

Compression:

Stored size: 869 Bytes

Contents

#ifndef AWS_COMMON_LIFO_CACHE_H
#define AWS_COMMON_LIFO_CACHE_H
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#include <aws/common/cache.h>

AWS_EXTERN_C_BEGIN

/**
 * Initializes the last-in-first-out cache. Sets up the underlying linked hash table.
 * Once `max_items` elements have been added, the latest(last-in) item will
 * be removed. For the other parameters, see aws/common/hash_table.h. Hash table
 * semantics of these arguments are preserved.
 */
AWS_COMMON_API
struct aws_cache *aws_cache_new_lifo(
    struct aws_allocator *allocator,
    aws_hash_fn *hash_fn,
    aws_hash_callback_eq_fn *equals_fn,
    aws_hash_callback_destroy_fn *destroy_key_fn,
    aws_hash_callback_destroy_fn *destroy_value_fn,
    size_t max_items);

AWS_EXTERN_C_END

#endif /* AWS_COMMON_LIFO_CACHE_H */

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
aws-crt-0.1.8 aws-crt-ffi/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.7 aws-crt-ffi/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.6 aws-crt-ffi/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.5 aws-crt-ffi/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.4 aws-crt-ffi/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.2 aws-crt-ffi/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.1.pre native/crt/aws-c-common/include/aws/common/lifo_cache.h
aws-crt-0.1.0.pre native/crt/aws-c-common/include/aws/common/lifo_cache.h