Interface: CachedScan
@arolariu/website / types / CachedScan
Interface: CachedScan
Defined in: types/scans/Scan.ts:217
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
cachedAttracks cache freshness for stale-while-revalidate pattern
Example
const cachedScan: CachedScan = {
...scan,
cachedAt: new Date(),
};
Extends
Properties
id
readonlyid:string
Defined in: types/scans/Scan.ts:143
Unique identifier for the scan (UUIDv7). Assigned at upload time and immutable.
Inherited from
userIdentifier
readonlyuserIdentifier:string
Defined in: types/scans/Scan.ts:149
The user identifier of the scan owner. Stored in Azure Blob metadata for filtering by user.
Inherited from
name
name:
string
Defined in: types/scans/Scan.ts:155
Human-readable name for the scan. Defaults to original filename, can be edited by user.
Inherited from
blobUrl
readonlyblobUrl:string
Defined in: types/scans/Scan.ts:161
Full URL to the scan in Azure Blob Storage. Format: https://cdn.arolariu.ro/scans/{userIdentifier}/{scanId}_{timestamp}.{ext}
Inherited from
mimeType
readonlymimeType:string
Defined in: types/scans/Scan.ts:167
MIME type of the uploaded file. Examples: "image/jpeg", "image/png", "application/pdf"
Inherited from
sizeInBytes
readonlysizeInBytes:number
Defined in: types/scans/Scan.ts:172
File size in bytes.
Inherited from
scanType
readonlyscanType:ScanType
Defined in: types/scans/Scan.ts:178
Document format classification. Derived from mimeType during upload.
Inherited from
uploadedAt
readonlyuploadedAt:Date
Defined in: types/scans/Scan.ts:183
Timestamp when the scan was uploaded.
Inherited from
status
status:
ScanStatus
Defined in: types/scans/Scan.ts:188
Current lifecycle status of the scan.
Inherited from
metadata
metadata:
Record<string,string>
Defined in: types/scans/Scan.ts:194
Additional metadata stored with the blob. Can include OCR hints, original dimensions, etc.
Inherited from
cachedAt
cachedAt:
Date
Defined in: types/scans/Scan.ts:222
Timestamp when this scan was cached in IndexedDB. Used to determine cache freshness.