# Class SearchResultCache.CacheStats

java.lang.Object
com.university.bookstore.search.SearchResultCache.CacheStats

Enclosing class:
  `SearchResultCache`

public static class SearchResultCache.CacheStats extends Object
Statistics class for cache performance monitoring.

Since:
  2024-09-15
Version:
  3.0
Author:
  Navid Mohaghegh

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CacheStats(int currentSize, int maxSize, double hitRatio, double averageAge, long totalRequests, long totalHits)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `getAverageAge()`
  `int`
  `getCurrentSize()`
  `double`
  `getHitRatio()`
  `int`
  `getMaxSize()`
  `long`
  `getTotalHits()`
  `long`
  `getTotalRequests()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CacheStats

    public CacheStats(int currentSize, int maxSize, double hitRatio, double averageAge, long totalRequests, long totalHits)

- ## Method Details

  - ### getCurrentSize

    public int getCurrentSize()

  - ### getMaxSize

    public int getMaxSize()

  - ### getHitRatio

    public double getHitRatio()

  - ### getAverageAge

    public double getAverageAge()

  - ### getTotalRequests

    public long getTotalRequests()

  - ### getTotalHits

    public long getTotalHits()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`