Skip to content

Fix: rename create_cache in plugin#259

Merged
1a1a11a merged 1 commit intodevelopfrom
hxia/plugin
Jul 12, 2025
Merged

Fix: rename create_cache in plugin#259
1a1a11a merged 1 commit intodevelopfrom
hxia/plugin

Conversation

@haochengxia
Copy link
Copy Markdown
Collaborator

Fix #258

@haochengxia haochengxia requested a review from Copilot July 11, 2025 15:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 renames the plugin cache creation function from create_cache to create_cache_using_plugin and updates its usage and documentation accordingly.

  • Renamed create_cache to create_cache_using_plugin in header, implementation, and usage in mrcProfiler.cpp
  • Updated related Doxygen comments to reference the new function name

Reviewed Changes

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

File Description
libCacheSim/mrcProfiler/mrcProfiler.cpp Updated call to use create_cache_using_plugin
libCacheSim/include/libCacheSim/plugin.h Renamed function declaration and updated comment
libCacheSim/cache/plugin.c Renamed function definition
Comments suppressed due to low confidence (2)

libCacheSim/include/libCacheSim/plugin.h:52

  • Renaming the core API function will break existing integrations. Consider adding a deprecated create_cache alias that forwards to create_cache_using_plugin to maintain backward compatibility.
cache_t *create_cache_using_plugin(const char *const cache_alg_name,

libCacheSim/cache/plugin.c:93

  • The renamed function create_cache_using_plugin lacks dedicated unit tests. Consider adding tests to cover plugin-based cache initialization and error cases.
cache_t *create_cache_using_plugin(const char *const cache_alg_name,

.default_ttl = 0,
.hashpower = 20,
.consider_obj_metadata = false};
caches[i] = create_cache(params_.cache_algorithm_str, cc_params, nullptr);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Do we need to update this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We can directly use create_cache_internal here

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nvm

@1a1a11a 1a1a11a merged commit 31fc1a9 into develop Jul 12, 2025
9 checks passed
@1a1a11a 1a1a11a deleted the hxia/plugin branch July 12, 2025 23:12
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.

[BUG]: Duplicate create_cache

3 participants