lookup
Returns a LookupBuilder that will perform a non-transactional cache lookup.
In contrast to Transaction::lookup(), a non-transactional lookup will not attempt to coordinate with any concurrent cache lookups. If two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both get nothing from the eventual lookup execution. Without further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.
To resolve such races between concurrent lookups, use Transaction::lookup() instead.
Overload 1 of 2
Returns a LookupBuilder that will perform a non-transactional cache lookup.
In contrast to Transaction::lookup(), a non-transactional lookup will not attempt to coordinate with any concurrent cache lookups. If two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both get nothing from the eventual lookup execution. Without further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.
To resolve such races between concurrent lookups, use Transaction::lookup() instead.
Parameters
- key: std::span<const std::uint8_t>
Returns
Overload 2 of 2
Non-transactional cache lookup with string key.
Parameters
- key: std::string_view
Returns