Skip to main content

PdfCacheStatsDto

Combined PDF cache statistics.

Exposes both the on-disk rendered-page cache and the in-memory open-document handle cache in a single payload.

handles objectrequired

In-memory open-document handle cache (PDFium).

capacityinteger<int64>required

Maximum number of handles the cache will retain.

Possible values: >= 0

Example: 256
currentSizeinteger<int64>required

Number of handles currently cached.

Possible values: >= 0

Example: 12
enabledbooleanrequired

Whether the handle cache is enabled.

Example: true
entries object[]required

Per-entry detail for the admin UI.

  • Array [
  • ageSecondsinteger<int64>required

    Seconds since the handle was opened.

    Possible values: >= 0

    Example: 312
    bookIdstring<uuid>required

    Book ID for the cached document.

    Example: 550e8400-e29b-41d4-a716-446655440000
    filePathstringrequired

    File path of the opened PDF.

    Example: /library/books/manual.pdf
    idleSecondsinteger<int64>required

    Seconds since the last render against this handle.

    Possible values: >= 0

    Example: 14
    renderCountinteger<int64>required

    Number of renders served from this handle.

    Possible values: >= 0

    Example: 27
  • ]
  • evictionsinteger<int64>required

    Cumulative evictions (capacity + manual).

    Possible values: >= 0

    Example: 5
    hitsinteger<int64>required

    Cumulative cache hits (handle reused without re-opening).

    Possible values: >= 0

    Example: 4321
    idleEvictionsinteger<int64>required

    Cumulative idle-TTL evictions performed by the sweeper.

    Possible values: >= 0

    Example: 3
    idleTtlSecondsinteger<int64>required

    Idle TTL in seconds before a handle is evicted by the background sweeper.

    Possible values: >= 0

    Example: 900
    missesinteger<int64>required

    Cumulative cache misses (no entry on lookup).

    Possible values: >= 0

    Example: 87
    opensinteger<int64>required

    Cumulative PDFium opens performed by the cache.

    Possible values: >= 0

    Example: 87
    pages objectrequired

    Disk-backed rendered-page cache (JPEGs).

    bookCountinteger<int64>required

    Number of unique books with cached pages

    Possible values: >= 0

    Example: 45
    cacheDirstringrequired

    Path to the cache directory

    Example: /data/cache
    cacheEnabledbooleanrequired

    Whether the PDF page cache is enabled

    Example: true
    oldestFileAgeDaysinteger,null<int32>nullable

    Age of the oldest cached file in days (if any files exist)

    Possible values: >= 0

    Example: 15
    totalFilesinteger<int64>required

    Total number of cached page files

    Possible values: >= 0

    Example: 1500
    totalSizeBytesinteger<int64>required

    Total size of cache in bytes

    Possible values: >= 0

    Example: 157286400
    totalSizeHumanstringrequired

    Human-readable total size (e.g., "150.0 MB")

    Example: 150.0 MB
    PdfCacheStatsDto
    {
    "handles": {
    "capacity": 256,
    "currentSize": 12,
    "enabled": true,
    "entries": [
    {
    "ageSeconds": 312,
    "bookId": "550e8400-e29b-41d4-a716-446655440000",
    "filePath": "/library/books/manual.pdf",
    "idleSeconds": 14,
    "renderCount": 27
    }
    ],
    "evictions": 5,
    "hits": 4321,
    "idleEvictions": 3,
    "idleTtlSeconds": 900,
    "misses": 87,
    "opens": 87
    },
    "pages": {
    "bookCount": 45,
    "cacheDir": "/data/cache",
    "cacheEnabled": true,
    "oldestFileAgeDays": 15,
    "totalFiles": 1500,
    "totalSizeBytes": 157286400,
    "totalSizeHuman": "150.0 MB"
    }
    }