Skip to main content

Interface: CachedScan

@arolariu/website


@arolariu/website / types/scans/Scan / CachedScan

Interface: CachedScan

Defined in: types/scans/Scan.ts:233

Cached version of Scan with local-only fields for IndexedDB persistence.

Remarks​

Extends the base Scan type with fields that are only relevant for local caching and hydration. These fields are not stored in Azure.

Cache Strategy:

  • Scans are cached in IndexedDB for fast initial page load
  • Background sync fetches fresh data from Azure
  • cachedAt tracks cache freshness for stale-while-revalidate pattern

Example​

const cachedScan: CachedScan = {
...scan,
cachedAt: new Date(),
};

Extends​

Properties​

id​

readonly id: string

Defined in: types/scans/Scan.ts:159

Unique identifier for the scan (UUIDv7). Assigned at upload time and immutable.

Inherited from​

Scan.id


userIdentifier​

readonly userIdentifier: string

Defined in: types/scans/Scan.ts:165

The user identifier of the scan owner. Stored in Azure Blob metadata for filtering by user.

Inherited from​

Scan.userIdentifier


name​

name: string

Defined in: types/scans/Scan.ts:171

Human-readable name for the scan. Defaults to original filename, can be edited by user.

Inherited from​

Scan.name


blobUrl​

readonly blobUrl: string

Defined in: types/scans/Scan.ts:177

Full URL to the scan in Azure Blob Storage. Format: https://cdn.arolariu.ro/scans/{userIdentifier}/{scanId}_{timestamp}.{ext}

Inherited from​

Scan.blobUrl


mimeType​

readonly mimeType: string

Defined in: types/scans/Scan.ts:183

MIME type of the uploaded file. Examples: "image/jpeg", "image/png", "application/pdf"

Inherited from​

Scan.mimeType


sizeInBytes​

readonly sizeInBytes: number

Defined in: types/scans/Scan.ts:188

File size in bytes.

Inherited from​

Scan.sizeInBytes


scanType​

readonly scanType: ScanType

Defined in: types/scans/Scan.ts:194

Document format classification. Derived from mimeType during upload.

Inherited from​

Scan.scanType


uploadedAt​

readonly uploadedAt: Date

Defined in: types/scans/Scan.ts:199

Timestamp when the scan was uploaded.

Inherited from​

Scan.uploadedAt


status​

status: ScanStatus

Defined in: types/scans/Scan.ts:204

Current lifecycle status of the scan.

Inherited from​

Scan.status


metadata​

metadata: ScanMetadata

Defined in: types/scans/Scan.ts:210

Canonical typed metadata stored with the blob. Contains lifecycle tracking, document classification, and ownership information.

Inherited from​

Scan.metadata


cachedAt​

cachedAt: Date

Defined in: types/scans/Scan.ts:238

Timestamp when this scan was cached in IndexedDB. Used to determine cache freshness.

// was this page useful?