- Issue created by @godotislate
In
✨
Improve query and cache API so that render() doesn't have to be called to add query cache metadata
Active
, entity query classes were updated to implement RefinableCacheableDependencyInterface
, so that any cacheable metadata needed in the logic to build the queries is accessible from the query object.
EntityStorage::loadByProperties()
uses entity queries under the hood, so ideally code calling loadByProperties()
should able to retrieve the cacheable metadata from the query. In addition, EntityRepository::loadEntityByUuid()
calls EntityStorage::loadByProperties()
, so the same should apply.
Add an additional optional parameter EntityStorageInterface::loadByProperties() and EntityRepositoryInterface::loadEntityByUuid()
for calling code to pass in an object (CacheableMetadata, probably?) that can capture the cacheable metadata from the underlying entity query.
There might also be a need to identify other Entity API methods that similarly wrap entity queries and see whether they need to provide a way to access the cache metadata as well.
Active
11.0 🔥
entity system