TTileKey.Create combines DocumentRevision, PageNumber, Zoom, Rotation, RenderOptions, TileLeft, TileTop, TileWidth and TileHeight into a stable render-tile key
Equals compares every key field and tolerates sub-micro zoom differences
| Method | Description |
|---|---|
Create(Capacity: Integer = 64) | Creates a bounded cache with a minimum capacity of one tile |
Create(Capacity: Integer; Governor: TPdfCacheGovernor) | Creates a cache that also competes in a shared byte budget |
Destroy | Clears the cache and releases every owned bitmap |
Get(const Key: TTileKey): TBitmap | Returns the cached bitmap without transferring ownership and updates local and shared recency |
Put(const Key: TTileKey; Bitmap: TBitmap) | Transfers bitmap ownership to the cache and retains it only when both the entry capacity and shared byte budget permit it |
InvalidatePage(PageNumber: Integer) | Removes all tiles for one page |
InvalidateRevision(DocumentRevision: Int64) | Retains only tiles belonging to the supplied document revision |
Clear | Releases all cached bitmaps and governor tokens |
| Property | Type | Description |
|---|---|---|
Capacity | Integer | Maximum tile count |
Count | Integer | Current tile count |
StoredBytes | Int64 | Current bitmap charge using width times height times four bytes |
CacheGovernor | TPdfCacheGovernor | Optional shared governor; assigning one first clears existing entries |
The cache never owns CacheGovernor
The governor must outlive the cache, or the property must be set to nil before the governor is freed