refactor: improve node cache public API naming and docs#432
Open
refactor: improve node cache public API naming and docs#432
Conversation
Rename ambiguous methods for clarity: - node_cache_size → node_cache_num_slots - node_cache_clear_metrics → node_cache_reset_metrics - node_cache_size_bytes_approx → node_cache_heap_usage Consolidate sizing guidance on the DEFAULT_NODE_CACHE_NUM_SLOTS constant and remove hardcoded values from method docs.
5932366 to
b96b989
Compare
|
|
|
|
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarify the node cache public API before it stabilizes.
node_cache_size→node_cache_num_slotsto avoid ambiguity with byte sizenode_cache_clear_metrics→node_cache_reset_metricsto distinguish fromnode_cache_clear(which evicts nodes and resets metrics)node_cache_size_bytes_approx→node_cache_heap_usagefor brevityDEFAULT_NODE_CACHE_NUM_SLOTSconstant, remove duplicated hardcoded values from method docsnode_cache_metricsdoctest to show the reset-then-measure patternNodeCacheMetricsstruct doc