Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kassane/sieve-cache-cpp

A SIEVE cache implementation for C++
https://github.com/kassane/sieve-cache-cpp

cache-algorithm cpp sieve sieve-cache

Last synced: 2 months ago
JSON representation

A SIEVE cache implementation for C++

Awesome Lists containing this project

README

        

# Sieve Cache in C++ (header only)

A [SIEVE cache](https://cachemon.github.io/SIEVE-website/) implementation for C++. Based on [D implementation](https://github.com/kubo39/sieve-cache-d).

### How to Use

* Test on [godbolt](https://godbolt.org/z/fej9cM61j)

**or**

* Add in your `CMakeLists.txt`

```cmake
include(FetchContent)
FetchContent_Declare(
sieve
GIT_REPOSITORY "https://github.com/kassane/sieve-cache-cpp.git"
GIT_TAG main
)
set(BUILD_BENCH OFF)
set(BUILD_TESTS OFF)
FetchContent_GetProperties(sieve)
if(NOT sieve_POPULATED)
FetchContent_Populate(sieve)
endif()
set(SIEVE_PATH "${sieve_SOURCE_DIR}/include")

add_executable(${PROJECT_NAME} "demo.cc")
target_include_directories(${PROJECT_NAME} PRIVATE ${SIEVE_PATH})
```

```bash
$ cmake -B build
$ cmake --build build
# Run benchmark sample (if enabled)
$ cmake --build build --target bench
# Run unittest (if enabled)
$ cmake --build build --target unittest
```

## LICENSE

See: [LICENSE](LICENSE)