{"modulePath":"github.com/onflow/flow-go","version":"v0.32.2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\n## Types\n\n```go\ntype ExecutionDataCache struct {\n\t// contains filtered or unexported fields\n}\n```\nExecutionDataCache is a read-through cache for ExecutionData.\n\n```go\nfunc NewExecutionDataCache(\n\tbackend execution_data.ExecutionDataGetter,\n\theaders storage.Headers,\n\tseals storage.Seals,\n\tresults storage.ExecutionResults,\n\tcache mempool.ExecutionData,\n) *ExecutionDataCache\n```\nNewExecutionDataCache returns a new ExecutionDataCache.\n\n```go\nfunc (c *ExecutionDataCache) ByBlockID(ctx context.Context, blockID flow.Identifier) (*execution_data.BlockExecutionDataEntity, error)\n```\nByBlockID returns the execution data for the given block ID.\n\nExpected errors during normal operations: - storage.ErrNotFound if a seal or execution result is not available for the block - BlobNotFoundError if some CID in the blob tree could not be found from the blobstore - MalformedDataError if some level of the blob tree cannot be properly deserialized - BlobSizeLimitExceededError if some blob in the blob tree exceeds the maximum allowed size\n\n```go\nfunc (c *ExecutionDataCache) ByHeight(ctx context.Context, height uint64) (*execution_data.BlockExecutionDataEntity, error)\n```\nByHeight returns the execution data for the given block height.\n\nExpected errors during normal operations: - storage.ErrNotFound if a seal or execution result is not available for the block - BlobNotFoundError if some CID in the blob tree could not be found from the blobstore - MalformedDataError if some level of the blob tree cannot be properly deserialized - BlobSizeLimitExceededError if some blob in the blob tree exceeds the maximum allowed size\n\n```go\nfunc (c *ExecutionDataCache) ByID(ctx context.Context, executionDataID flow.Identifier) (*execution_data.BlockExecutionDataEntity, error)\n```\nByID returns the execution data for the given ExecutionDataID.\n\nExpected errors during normal operations: - BlobNotFoundError if some CID in the blob tree could not be found from the blobstore - MalformedDataError if some level of the blob tree cannot be properly deserialized - BlobSizeLimitExceededError if some blob in the blob tree exceeds the maximum allowed size\n\n```go\nfunc (c *ExecutionDataCache) LookupID(blockID flow.Identifier) (flow.Identifier, error)\n```\nLookupID returns the ExecutionDataID for the given block ID.\n\nExpected errors during normal operations: - storage.ErrNotFound if a seal or execution result is not available for the block\n\n","path":"github.com/onflow/flow-go/module/executiondatasync/execution_data/cache","name":"cache","synopsis":"","isRedistributable":true}
