- Issue created by @mglaman
- @mglaman opened merge request.
AutoSaveManager leverages static caching. But it chooses not to cache empty auto-saves in \Drupal\experience_builder\AutoSave\AutoSaveManager::getAutoSaveEntity. For my layout API request this resulted in 90x database queries for the temp store.
Caching empty auto-save reduced it to 21x.
Before:
90x 27.2 ms select ... from key_value_expire where ? > :now and ? in (:keys__0) and ? = :collection
After:
21x 6.26 ms select ... from key_value_expire where ? > :now and ? in (:keys__0) and ? = :collection
if (\is_null($auto_save_data)) {
$auto_save_entity = AutoSaveEntity::empty();
$this->cache->set($key, $auto_save_entity, tags: [self::CACHE_TAG]);
return $auto_save_entity;
}
Active
1.0
… to be triaged