TransactionCacheEntry
Extends CacheEntry.
Represents a cached item retrieved via a transactional lookup (CoreCache.transactionLookup). Extends CacheEntry with methods for inserting, updating, and cancelling cache transactions.
Methods
insert
View sourcePerform a transactional cache insertion, returning a FastlyBody instance for providing the cached object itself.
This method should only be called when TransactionCacheEntry.state().mustInsertOrUpdate() is true; otherwise, an error will be thrown when attempting to perform the insertion.
Parameters
- options: TransactionInsertOptions
Returns
insertAndStreamBack
View sourcePerform a transactional cache insertion, returning a FastlyBody instance for providing the cached object itself, and a CacheEntry instance which can be used to stream out the newly-inserted cache item.
For the insertion to complete successfully, the object must be written into the returned FastlyBody instance, and then FastlyBody.prototype.close must be called.
If FastlyBody.prototype.close does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.
Parameters
- options: TransactionInsertOptions
Returns
update
View sourcePerform an update of the cache item's metadata.
Parameters
- options: TransactionUpdateOptions
Returns