MCPcopy
hub / github.com/redis/redis-py / record_csc_eviction

Method record_csc_eviction

redis/observability/metrics.py:680–696  ·  view source on GitHub ↗

Record a Client Side Caching (CSC) eviction. Args: count: Number of evictions reason: Reason for eviction

(
        self,
        count: int,
        reason: Optional[CSCReason] = None,
    )

Source from the content-addressed store, hash-verified

678 self.csc_requests.add(1, attributes=attrs)
679
680 def record_csc_eviction(
681 self,
682 count: int,
683 reason: Optional[CSCReason] = None,
684 ) -> None:
685 """
686 Record a Client Side Caching (CSC) eviction.
687
688 Args:
689 count: Number of evictions
690 reason: Reason for eviction
691 """
692 if not hasattr(self, "csc_evictions"):
693 return
694
695 attrs = self.attr_builder.build_csc_attributes(reason=reason)
696 self.csc_evictions.add(count, attributes=attrs)
697
698 def record_csc_network_saved(
699 self,

Callers 1

record_csc_evictionFunction · 0.80

Calls 2

build_csc_attributesMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected