CacheStatsService

Service interface for collecting cache performance statistics during stats generation.

This service tracks different types of cache hits and misses to provide insights into how effective the caching layers are during GitHub API requests.

Inheritors

Functions

Link copied to clipboard

Gets the cache status summary for PR-level requests and resets the tracking.

Link copied to clipboard

Gets the current cache statistics snapshot.

Link copied to clipboard
abstract fun recordDatabaseCacheHit()

Records a database cache hit (response served from PostgreSQL).

abstract fun recordDatabaseCacheHit(url: String)

Records a database cache hit for a specific request type.

Link copied to clipboard

Records a database cache miss (not found in PostgreSQL cache).

abstract fun recordDatabaseCacheMiss(url: String)

Records a database cache miss for a specific request type.

Link copied to clipboard
abstract fun recordNetworkRequest()

Records a network request (cache miss from all layers).

Link copied to clipboard
abstract fun recordOkHttpCacheHit()

Records an OkHttp cache hit (response served from OkHttp's file cache).

Link copied to clipboard
abstract fun reset()

Resets all cache statistics counters.