# A bounded cache whose entries expire a fixed time after they are
# written, and a caching proxy that reads through it and removes the
# cached copy after each write. Time comes from an injected clock.
add_library(adv_ttl_cache STATIC products.cpp cached_products.cpp)
target_include_directories(adv_ttl_cache PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

lld_add_example(adv_ttl_cache_demo SOURCES main.cpp EXPECTED_OUTPUT expected_output.txt)
target_link_libraries(adv_ttl_cache_demo PRIVATE adv_ttl_cache)

lld_add_test(adv_ttl_cache_tests SOURCES tests/test_ttl_cache.cpp)
target_link_libraries(adv_ttl_cache_tests PRIVATE adv_ttl_cache)
