Skip to content

Improve API docs#45

Draft
dalloriam wants to merge 3 commits into
feature/stricter-conceptsfrom
doc/api-docs-0.4
Draft

Improve API docs#45
dalloriam wants to merge 3 commits into
feature/stricter-conceptsfrom
doc/api-docs-0.4

Conversation

@dalloriam

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves public API documentation for cache concepts, policies, presets, measurement helpers, locking strategies, and custom policy implementation guidance. It also promotes reusable concepts into a new public cachemere/concepts.h header and updates policy/cache templates to use it.

Changes:

  • Added include/cachemere/concepts.h and exported/included it through the umbrella header and CMake sources.
  • Updated template constraints to use public concepts instead of detail::traits.
  • Expanded Doxygen comments for presets, cache results, policy tickets, constraints, measurement utilities, composite keys, and custom policy docs.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CMakeLists.txt Adds the new public concepts header to interface sources.
include/cachemere.h Exposes cachemere/concepts.h via the umbrella include.
include/cachemere/cache.h Uses public concepts and improves API documentation.
include/cachemere/concepts.h Introduces public cache-related concepts.
include/cachemere/composite_key.h Adds documentation for composite key construction, comparison, and hashing.
include/cachemere/detail/locking.h Expands LockingStrategy documentation.
include/cachemere/detail/traits.h Removes concepts that are now public while retaining internal traits.
include/cachemere/measurement.h Documents measurement helpers and pointer handling.
include/cachemere/policy/constraint_count.h Uses public concepts and documents tickets/constraint methods.
include/cachemere/policy/constraint_memory.h Uses public concepts and documents tickets/constraint methods.
include/cachemere/policy/detail/hash_mixer.h Uses the public hasher concept.
include/cachemere/policy/eviction_gdsf.h Uses public concepts and documents eviction tickets/rollback behavior.
include/cachemere/policy/eviction_lru.h Uses public concepts and documents eviction tickets/rollback behavior.
include/cachemere/policy/eviction_segmented_lru.h Uses public concepts and documents eviction tickets/rollback behavior.
include/cachemere/policy/insertion_always.h Uses public concepts.
include/cachemere/policy/insertion_tinylfu.h Uses public concepts.
include/cachemere/presets.h Adds documentation for preset alias templates.
implementingCustomPolicies.dox Updates custom policy documentation to match the current policy interfaces.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants