Skip to content

PdfCacheCreationRequest

PdfCacheCreationRequest extends PdfCacheRequest with the PDF bytes to write, forming the request contract for populating a cache entry rather than reading one.

Purpose

  • Carries the PDF bytes to be written into the cache store, alongside the identity and cache-type fields inherited from PdfCacheRequest.

Context

  • Namespace: PdfAPI.Core.Cache
  • Assembly/package: PdfAPI.Core

Public members

Member Signature Purpose
PdfCacheCreationRequest(long, byte[], bool, CacheType) PdfCacheCreationRequest(long id, byte[] pdf, bool pdfa, CacheType cacheType) Constructs a cache-write request with the source id, PDF bytes, PDF/A flag, and target cache type.
Pdf byte[] Pdf { get; set; } The PDF bytes to write into the cache.

Inherited public members

Members in this section are inherited from PdfCacheRequest in PdfAPI.Core. They are available on this type through inheritance.

Member Signature Purpose Origin
RequestId Guid RequestId { get; } A new Guid generated per request instance, identifying this specific request. PdfAPI.Core — PdfCacheRequest
CacheType CacheType CacheType { get; set; } The cache store to write to. PdfAPI.Core — PdfCacheRequest
Id long Id { get; set; } The source id of the PDF being cached. PdfAPI.Core — PdfCacheRequest
Pdfa bool Pdfa { get; set; } Whether the cached PDF is the PDF/A variant. PdfAPI.Core — PdfCacheRequest
IsValid bool IsValid => Id > 0 true only when Id is a positive value. (BR-43) PdfAPI.Core — PdfCacheRequest

Behavioral notes

  • IsValid, inherited unchanged from PdfCacheRequest, does not consider Pdf when determining validity — a request with a positive Id but null Pdf is still reported valid. (BR-43)

Constraints and usage notes

  • Populate Pdf before submitting this request to a cache-write operation; IsValid alone does not guarantee Pdf is set.

Sources

  • PdfAPI.Core\Cache\PdfCacheCreationRequest.cs